Skip to content

MCSets/mcsets-js-sdk-client

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

28 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

mcsets-js-sdk-client

Publish NPM Test

Library to manage and interact with MCSets API's

Installation (NPM)

npm install mcsets-js-sdk-client

Usage

MCSetsAPI

.from(apiKey: string | null, platform: 'base' | 'setstore' | 'enterprise', options: Options)

The only platform that can be used with a null API key is the base platform. For the instance where a key is provided for the base platform, it will be disregarded and not inserted into the headers. In the case that no API key is provided when providing either setstore or enterprise and error will arise alerting of the empty API key parameter.

This functiion will take an API key provded and insert it into the proper authentication header based on the provided platform. See documentation on auth headers here.

Example

const { MCSetsAPI } = require('mcsets-js-sdk-client')

const apiKey = 'ent_live_xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx'

const api = MCSetsAPI.from(apiKey, 'enterprise') // other platform options: 'base' or 'setstore'

// Returns a list of products for the authenticated enterprise account
await api.getProducts().then(console.log)

Documentation

For more information on the available functions and endpoints for the MCSets API, please see the API Documentation for more details.

About

Library to manage and interact with MCSets API's

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors