keyhole-client
v0.5.3
Published
A minimal wrapper of the keyhole tracker API
Downloads
6
Maintainers
Readme
keyhole-client
Just a minimal and slick wrapper of the keyhole API.
Install
npm install keyhole-client
Usage
import createKeyholeClient from 'heyhole-client'
// Create the client using your keyhole access token
const client = createKeyholeClient('my_access_token')
// Create your tracker
const id = await client.createTracker(['soccer', '#fifa'], ['twitter', 'instagram'])
// Pause your tracker
await client.pauseTracker(id)
// Unpause your tracker
await client.startTracker(id)
// List your available trackers
const trackers = await client.getTrackers()
// Get specific tracker
const tracker = await client.getTracker(id)
Errors
NotFoundError
: Triggered when a tracker is not foundNotAuthenticatedError
: Triggered when your access token is invalidMissingParameterError
: Triggered when the parameters inserted are invalidInternalServerError
: Triggered on unspecified errors or due to rate limiting
Typescript
This project is built in typescript and includes TypeScript definitions.