BTU.JS is a javascript library that interacts with BTU Protocol. It allows any developer to build a booking application or a widget.
- Getting started
- Components
- Resources methods
- searchResources
- getResource
- getResourceItem
- isRessourceAvailable
- addResource Private beta - contact us
- deleteResource Private beta - contact us
- editResource Private beta - contact us
- Availabilities methods
- searchAvailableResources
- getResourceAvailabilities
- bookResource
- getBookingDetails
- cancelBooking
- addAvailability Private beta - contact us
- removeAvailability Private beta - contact us
npm install btujs --save
const btujs = require('btujs');
const myBtujs = new btujs();
Documentation for this project
Search for resources regardless of their availabilities.
myBtujs.resources.searchResources(String resourceType, Object body, Function callback)
Query resource by its ID to get its details.
myBtujs.resources.getResource(String resourceType, String resourceId, Object body, Function callback)
Query resource by its ID and its sub-item ID to get sub-item details.
myBtujs.resource.getResourceItem(String resourceType, String resourceId, String itemId, Object body, Function callback)
Search for availables resources only.
myBtujs.availabilities.searchAvailableResources(String resourceType, Object body, Function callback)
Query a resource by its ID and get its availabilities.
myBtujs.availabilities.getResourceAvailabilities(String resourceType, String resourceId, Object body, Function callback)
Check if a resource is available under different conditions.
myBtujs.availabilities.isResourceAvailable(String resourceType, String resourceId, Object body, Function callback)
{
isAvailable: true // or false
}
Book a resource availability.
myBtujs.availabilities.bookResource(String resourceType, String resourceId, Object body, Function callback)
Get informations about a booking you made.
myBtujs.availabilities.getBookingDetails(String resourceType, String bookingId, Object body, Function callback)
Cancel a reservation you booked through the bookResource method.
myBtujs.availabilities.cancelBooking(String resourceType, String bookingId, Object body, Function callback)