3.3.6 • Published 5 months ago

@becomes/cms-client v3.3.6

Weekly downloads
19
License
MIT
Repository
github
Last release
5 months ago

Becomes CMS client library

NPM Version

This library provides an easy access to BCMS API.

Getting started

  1. Install package from NPM: npm i --save @becomes/cms-client
  2. Create a new Client instance and make a request to the BCMS:
import { createBcmsClient } from '@becomes/cms-client';

async function main() {
  /**
   * Creating a new instance of the Client object
   */
  const client = createBcmsClient({
    cmsOrigin:
      process.env.BCMS_API_ORIGIN ||
      'https://becomes-starter-projects.yourbcms.com',
    key: {
      id: process.env.BCMS_API_KEY || '629dcd4dbcf5017354af6fe8',
      secret:
        process.env.BCMS_API_KEY_SECRET ||
        '7a3c5899f211c2d988770f7561330ed8b0a4b2b5481acc2855bb720729367896',
    },
  });
  /**
   * Get an entry from the BCMS
   */
  const result = await client.entry.get({
    template: 'pages', // Template name or ID
    entry: 'home', // Entry slug or ID
  });
  console.log(result);
}
main().catch((err) => {
  console.error(err);
  process.exit(1);
});

Development

  • Clone the repository: git clone git@github.com:becomesco/cms-client,
  • Install dependencies: npm i
3.3.6

5 months ago

3.3.5

2 years ago

3.3.4

2 years ago

3.3.3

2 years ago

3.3.1

2 years ago

3.3.2

2 years ago

3.1.3

2 years ago

3.3.0

2 years ago

3.2.0

2 years ago

3.1.5

2 years ago

3.1.4

2 years ago

3.1.2

2 years ago

3.0.0-alpha.3

2 years ago

3.0.0-alpha.4

2 years ago

3.1.1

2 years ago

3.1.0

2 years ago

3.0.1

2 years ago

3.0.0

2 years ago

3.0.0-alpha.2

2 years ago

3.0.0-alpha.1

2 years ago

2.0.7

2 years ago

3.0.0-alpha1

2 years ago

3.0.0-alpha2

2 years ago

2.0.6

3 years ago

2.0.5

3 years ago

2.0.4

3 years ago

2.0.3

3 years ago

2.0.2

3 years ago

2.0.1

3 years ago

2.0.0

4 years ago

1.0.8

4 years ago

1.0.7

4 years ago

1.0.6

4 years ago

1.0.5

4 years ago

1.0.4

4 years ago

1.0.3

4 years ago

1.0.2

4 years ago

1.0.1

4 years ago

1.0.0

4 years ago