@cloudbourn/scheduler-sdk
TypeScript icon, indicating that this package has built-in type declarations

1.0.1 • Public • Published

@cloudbourn/scheduler-sdk

Create and manage jobs in a Cloudbourn Scheduler such as lingering.io

npm version Issues

Usage

const { setAuthorization, jobs } = require('@cloudbourn/scheduler-sdk')

setAuthorization('my-api-key')

const storedJob = await jobs.add({
  endpoint: 'https://webhook.site/abc-123-def-456',
  method: 'POST',
  body: {
    test: 'yes'
  },
  scheduleAt: new Date().toJSON()
})

The HTTP client defaults to communicating with https://api.lingering.io. To override:

const { setBaseUrl } = require('@cloudbourn/scheduler-sdk')

setBaseUrl('http://example.com/scheduler-api')

Package Sidebar

Install

npm i @cloudbourn/scheduler-sdk

Homepage

lingering.io

Weekly Downloads

0

Version

1.0.1

License

MIT

Unpacked Size

9.67 kB

Total Files

10

Last publish

Collaborators

  • sleavely