JSPM

  • Created
  • Published
  • Downloads 50782
  • Score
    100M100P100Q162497F
  • License MIT

JS client for DatoCMS REST Content Management API

Package Exports

  • @datocms/cma-client
  • @datocms/cma-client/dist/cjs/index.js
  • @datocms/cma-client/dist/esm/index.js

This package does not declare an exports field, so the exports above have been automatically detected and optimized by JSPM instead. If any package subpath is missing, it is recommended to post an issue to the original package (@datocms/cma-client) to support the "exports" field. If that is not possible, create a JSPM override to customize the exports field for this package.

Readme

@datocms/cma-client

TODO: description

Usage (NodeJS)

const { buildClient } = require('@datocms/cma-client');

const client = buildClient({ apiToken: 'XXX' });
const items = await client.items.list();

Usage (browser module)

<script type="module">
  // also valid: https://cdn.jsdelivr.net/npm/@datocms/cma-client/dist/browser/index.js
  import { buildClient } from 'https://unpkg.com/@datocms/cma-client/dist/browser/index.js';

  const client = buildClient({ apiToken: 'XXX' });
  const items = await client.items.list();
</script>