deskbookers
v5.15.4
Published
Deskbookers API JavaScript SDK
Downloads
12
Readme
Deskbookers JavaScript SDK
JavaScript library to connect to the Deskbookers API. Available to use server-side or client-side, but you must bring your own fetch
polyfill (fetch-everywhere
recommended).
Installation
npm install deskbookers
Overview
import 'fetch-everywhere'
import Deskbookers from 'deskbookers'
const deskbookers = new Deskbookers()
Every resource can be accessed via the Deskbookers instance:
// deskbookers.{{ RESOURCE_NAME }}.{{ METHOD }}
// Get a workplace
deskbookers.workplaces.retrieve('workplaceId')
And every resource returns a Promise
, so you can chain them together or use async/await
:
const workplaces = await deskbookers.workplaces.retrieve(params)
for (let workplace of workplaces) {
// Use workplace data
}
Available resources & methods
- account
- actions
- availability
- spaces
- events
- features
- notifications
- bookings
- venues
- payments
users.get({userId})
users.subscriptions({userId})
users.invoices({userId})
users.payments({userId})
users.upsert({userId, user})
users.createSource({userId, token, email, setDefault})
users.createCharge({userId, charge})
users.listSources({userId, limit, lastId})
users.deleteSource({userId, sourceId})
users.setDefaultSource({userId, sourceId})
users.createSetupIntent()
- reports