@plurall/sdk
v1.0.13
Published
Plurall SDK
Downloads
24
Keywords
Readme
Plurall SDK
Software Developer Kit - Node JS - Plurall
Table of Contents
Install
yarn add @plurall/sdk
Plurall Integration
ThirdParty
Preparing environment
These are all available environment variables:
- PLURALL_ENV: Environment to make the request (staging|production) - default staging
- PLURALL_TIMEOUT: Time to wait before timeout (ms) - default 20000
- DEBUG: Enable / disable debug mode (true|false) - default false
How to get user data?
import { ThirdParty } from '@plurall/sdk/Integration';
import { User } from '@plurall/sdk/Integration/models';
const { PLURALL_SECRET } = process.env;
try {
const hash = ThirdParty.encryptToken(token, PLURALL_SECRET);
const user: User = await ThirdParty.getUser({ app: "nome do app", hash });
} catch (error) {
console.error(error)
}