0.1.0 • Published 4 years ago
sep-sdk v0.1.0
SEP SDK
The SDK helps you to access the resources from SEP.
Getting Started
Install with NPM or Yarn
$ npm install sep-sdk
Usage Example
import { Auth, Api } from 'sep-sdk';
// Create an auth object to get the access token
const auth = new Auth();
auth
.login({
username: 'xxx',
password: 'yyy',
})
.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));
});
0.1.0
4 years ago