Skip to content

tillhub/tillhub-sdk-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

1b85201 · Sep 21, 2018
Sep 7, 2018
Sep 21, 2018
Sep 18, 2018
Sep 18, 2018
May 4, 2018
Jul 10, 2018
May 4, 2018
May 6, 2018
May 6, 2018
Jul 10, 2018
Sep 16, 2018
Sep 18, 2018
Jul 11, 2018
Jul 12, 2018
May 6, 2018
May 4, 2018
Sep 18, 2018
Sep 18, 2018

Repository files navigation

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