@sparkgba/sep-sdk
v0.3.0
Published
The SDK helps you to access the resources from SEP.
Downloads
11
Readme
SEP SDK
The SDK helps you to access the resources from SEP.
Getting Started
Install with NPM or Yarn
$ npm install sep-sdkUsage Example
import { Auth, Api } from '@sparkgba/sep-sdk';
// Create an auth object to get the access token
const auth = new Auth();
auth
.login({
username: 'your_username',
password: 'your_password',
})
.then((res) => {
const token = res.data.access_token;
// Create an API object with the access token
const api = new Api(token);
// Fetch content
api.userFetcher.me().then((res) => console.log(res));
});