0.1.0 • Published 2 years ago

@andyfen/sdk-nodejs v0.1.0

Weekly downloads
5
License
MIT
Repository
-
Last release
2 years ago

Nodejs SDK

Signup Email

import { SignupApi } from '../src';

const client = new SignupApi();

const { data } = await client.signup("email", {
  email,
  password: "pw@123S3cure!"
})
{
  token: "xxx"
}

Login Email

import { LoginApi } from '../src';

const loginClient = new LoginApi();

const { data: data } = await loginClient.login("email", {
  email,
  password: "pw@123S3cure!"
})
{
  token: "xxx"
}

Me

import { Configuration, MeApi } from '../src';

const config = new Configuration({
  accessToken: data.token
})
const meClient = new MeApi(config);

const { data } = await meClient.me()
{
  email: "xxx@xxx.com"
}
0.1.0

2 years ago