@salable/node-sdk
v3.4.1
Published
Node.js SDK to interact with Salable APIs
Downloads
45
Keywords
Readme
Salable SDK for JavaScript
The Salable SDK enables you to easily interact with the Salable ecosystem, accessing the Salable API, and other toolkit methods.
Getting Started
Let’s walk through setting up a project that uses the Salable API Class from the SDK and makes a simple call to retrieve all licenses. The following steps use npm as an example. These steps assume you have Node.js and npm already installed.
Create a new Node.js project.
Inside of the project, run:
npm install @salable/node-sdk
. Adding packages results in update in lock file, yarn.lock or package-lock.json. You should commit your lock file along with your code to avoid potential breaking changes.Create a new file called index.js, Instantiate a Salable Class and send a request.
import { Salable } from '@salable/node-sdk';
const salable = new Salable('{{API_KEY}}');
const check = await salable.licenses.check('{{PRODUCT_UUID}}', ['userId_1']);