stateset-node v0.0.83
Stateset Node.js Library
The Stateset Node.js Library provides convenient access to the Stateset API from applications written in server-side JavaScript.
Installation
Install the package with:
npm install stateset-node --save
Usage
The package needs to be configured with your account's secret key, which is available in the Stateset Cloud Platform Dashboard.
Get started with the Stateset API
- Go to the Stateset Cloud Platform Dashboard.
- Login with your Stateset account.
- Create an API key.
- Try the Node.js quickstart
Usage example
See the Node.js quickstart for complete code.
- Install the SDK package
npm install stateset-node
- Initialize the client
import stateset from 'stateset-node';
const client = new stateset({apiKey: process.env.STATESET_API_KEY});
- Make an API call
try {
const response = await client.returns.list();
const returns = response.returns;
console.log(returns);
} catch (error) {
console.error('Error fetching returns:', error);
}
Try out a sample app
This repository contains sample Node and web apps demonstrating how the SDK can access and utilize the Stateset API for various use cases.
To try out the sample Node app, follow these steps:
- Check out the Stateset Node.js Library repository.
- Obtain an API key from the Stateset Cloud Platform Dashboard.
- Navigate to the
samples
folder and runnpm install
. - Set your API key as an environment variable:
export STATESET_API_KEY=YOUR_API_KEY
. - Open the sample file you're interested in, e.g.,
returns_list.js
. - Run the sample file:
node returns_list.js
.
Documentation
See the Stateset API Documentation for complete documentation.
Contributing
See CONTRIBUTING.md for more information on contributing to the Stateset Node.js Library.
License
The contents of this repository are licensed under the Apache License, version 2.0.
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
10 months ago
9 months ago
9 months ago
10 months ago
10 months ago
10 months ago
10 months ago
11 months ago
2 years ago
3 years ago
3 years ago