New Research: Supply Chain Attack on Axios Pulls Malicious Dependency from npm.Details →
Socket
Book a DemoSign in
Socket

@becomes/cms-client

Package Overview
Dependencies
Maintainers
2
Versions
41
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@becomes/cms-client

Make external communication with BCMS easy.

latest
Source
npmnpm
Version
3.4.1
Version published
Weekly downloads
34
-59.52%
Maintainers
2
Weekly downloads
 
Created
Source

Becomes CMS client library

NPM Version

This library provides an easy access to BCMS API.

Getting started

  • Install package from NPM: npm i --save @becomes/cms-client
  • 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

FAQs

Package last updated on 15 May 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts