Learn about our RFC process, Open RFC meetings & more.Join in the discussion! »

@cheapreats/sdk

1.11.2 • Public • Published

CheaprEats Node.js SDK

npm version Documentation

CheaprEats Node.js SDK

$ npm install @cheapreats/sdk

Using the Published SDK Version

const CE = require('@cheapreats/sdk');

Using the SDK Locally

Locally importing is used typically while testing new SDK method implementations.

const CE = require('./index');

Example Usage

const CE = require('./index');
// const CE = require("cheapreats-node-sdk")

CE.setAuthenticationToken('YOUR_TOKEN');

CE.Verification.sendSms(12508574718)
.then(verification_request_id => console.log("SMS Sent", verification_request_id))
.catch(e => console.log(e));

Auto-generating code for New Mutation

The npm run add:mutation <Object>.<methodName> command auto-generates code for the Object and methodName passed.

For example - npm run add:mutation Category.batchArchive

Publishing to NPM

Ensure that package version in feature branch is ahead of master branch, otherwise publish will fail

Automatic:

By default package is automatically published anytime a change is made on master

Manual:

If package is to be published manually, execute following commands:

  • npm run build
  • npm publish
  • npm run generate-docs (Publishes docs)

Keywords

none

Install

npm i @cheapreats/sdk

DownloadsWeekly Downloads

28

Version

1.11.2

License

MIT

Unpacked Size

378 kB

Total Files

122

Last publish

Collaborators

  • avatar
  • avatar
  • avatar
  • avatar
  • avatar
  • avatar