Node API for Bookeo REST API, based on mappersmith.
Works on the server AND the browser :)
Adds some helpers
import Bookeo from 'node-bookeo'
const bookeo = new Bookeo({ secretKey, apiKey });
bookeo.client.bookings.all().then(results => {
// return bookings
console.table(results);
})
bookeo.client
gives you access to mappersmith instances from src/api.js.
method | description |
---|---|
bookeo.bookings(params) | GET /bookings |
bookeo.booking(id, options) | GET /bookings/{bookingId} |
bookeo.slots(params) | GET /availability/slots |
bookeo.products(params) | GET /settings/products |
bookeo.subaccounts(params) | GET /subaccounts |
- bookeo.booking options : expand(false) : expand booking customer + payments
method | description |
---|---|
bookeo.setApikey(apikey) | change API key for next requests |
bookeo.getAllSlots(params) | return all available slots grouped by products |
To get ApiKey with correct permission, send this link to user : https://signin.bookeo.com/?authappid=xxxxxx&permissions=bookings_r_all,availability_r,blocks_r_all
. see the scopes docs.
Bookeo
General
✓ add credentials headers to request
✓ return data key
Bookings
✓ add default startTime as 'startOfToday'
✓ add default endTime when not given
✓ return data key
✓ pass parameters
Subaccounts
✓ pass parameters
✓ return data key
Products
✓ pass parameters
✓ return data key
Slots
✓ pass parameters
✓ return data key
getAllSlots
✓ should return all slots grouped by product
booking
✓ should request bookeo api
✓ expand=false should have no customer, payments
✓ expand=true should have customer + payments
payments
✓ should request bookeo api
18 passing (94ms)
- bookeo-proxy : you need this to use node-bookeo in the browser
- react-bookeo