https://github.com/tillhub/tillhub-sdk-node
The Node.js SDK for the Tillhub API
https://github.com/tillhub/tillhub-sdk-node
api node-sdk nodejs sdk tillhub tillhub-api
Last synced: about 1 month ago
JSON representation
The Node.js SDK for the Tillhub API
- Host: GitHub
- URL: https://github.com/tillhub/tillhub-sdk-node
- Owner: tillhub
- License: apache-2.0
- Created: 2018-05-04T15:51:52.000Z (almost 8 years ago)
- Default Branch: master
- Last Pushed: 2018-09-21T05:33:32.000Z (over 7 years ago)
- Last Synced: 2025-11-23T16:02:31.410Z (4 months ago)
- Topics: api, node-sdk, nodejs, sdk, tillhub, tillhub-api
- Language: JavaScript
- Homepage: https://tillhub.github.io/tillhub-sdk-node/
- Size: 1.21 MB
- Stars: 6
- Watchers: 16
- Forks: 0
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE
Awesome Lists containing this project
README
# Tillhub Node.js SDK [](http://standardjs.com) [](https://github.com/semantic-release/semantic-release) [](https://codecov.io/gh/tillhub/tillhub-sdk-node)
> Abstraction for the Tillhub API
## Getting Started
```bash
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).
```js
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](https://tillhub.github.io/tillhub-sdk-node/) or from the [tree](https://github.com/tillhub/tillhub-sdk-node/blob/master/API.md).
## License
Apache-2.0