@tillhub/node-sdk

0.9.0 • Public • Published

Tillhub Node.js SDK js-standard-style semantic-release codecov

Abstraction for the Tillhub API

Getting Started

npm i @tillhub/node-sdk

A simple use case for consumers is making authenticated requests with token they can get from different auth schemes and or resources, e.g. from a user, a register a service account, etc. We are abstracting this in the auth class(es).

const Auth = require('@tillhub/node-sdk').v1.Auth
const auth = new Auth()
// or
// const auth = new Auth({ base: 'https://staging-api.tillhub.com'})

auth.loginServiceAccount('EDDB2494C2434EFE948655D6BA27E69A', '1bc3d7a5-48e5-46de-81e8-4205ee52130f', (err, body) => {
  if (err) throw err

  console.log('==============Token===============')
  console.log(body.token)
  console.log('===========client account=========')
  console.log(body.user)
  console.log('==================================')
})

Docs

Visit the API documention here or from the tree.

License

Apache-2.0

Readme

Keywords

Package Sidebar

Install

npm i @tillhub/node-sdk

Weekly Downloads

0

Version

0.9.0

License

Apache-2.0

Unpacked Size

87.9 kB

Total Files

31

Last publish

Collaborators

  • eljefedelrodeo
  • tillhub-engineering