Skip to content
Node JS wrapper for makeplans API
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
tests
.gitignore
package.json
readme.md

readme.md

#Node Wrapper for Makeplans API

See Makeplans API for detailed documentation

##Installation

npm install makeplans --save

##Usage

var Makeplans = require('makeplans');

var mp = new Makeplans(MAKEPLANS_API_KEY, MAKEPLANS_ACCOUNT_NAME);

mp.getResources().then(function(resources){
    console.log(resources);
});

##Methods

##Constructor

###Makeplans( apiKey, accountName, test? )

apiKey {string} - your Makeplans API key

accountName {string} - your Makeplans account name

test {boolean} (optional) - Uses test server if true


##Resources

###makeplans.getResources( id? )

id {string} (optional) - resource id


###makeplans.getResourceOpeningHours( id, params )

id {string} - resource id

params { from:'YYYY-MM-DD', to:'YYYY-MM-DD'} - date boundries


###makeplans.createResource( params )

title {string} - name of calendar

opening_hours_mon Array<"HH:MM"> - Default opening hours for Monday

opening_hours_xxx Array<"HH:MM"> - Default opening hours for XXX


###makeplans.updateResource( id, params )

id {string} - resource id

params {object}


###makeplans.deleteResource( id )

id {string} - resource id


###makeplans.getResourceExceptionDates( id, date?, params )

id {string} - resource id

date {string} "YYYY-MM-DD" (optional) - date to check

params {from, to} - date boundries


###makeplans.createResourceExceptionDate( id, date, openingHours ) ###.updateResourceExceptionDate( id, date, openingHours )

id {string} - resource id

date {string} "YYYY-MM-DD" - date to create/update

openingHours Array<opening_hours> - opening hours for that date


###makeplans.deleteResourceExceptionDate( id, date )

id {string} - resource id

date {string} "YYYY-MM-DD" - date to delete


##Providers

###makeplans.getProviders()


###makeplans.createProvider( resourceId, serviceId )

resourceId {number} - resource providing service

serviceId {number} - service being provided


###makeplans.updateProvider( providerId, resourceId, serviceId )

providerId {number}

resourceId {number}

serviceId {number}


###makeplans.deleteProvider( providerId )

providerId {number}


##Categories

###makeplans.getCategories()


###makeplans.createCategory( params )

title {string} - Category name

parent_id {string|null} - id of parent category for nesting

service_id_list {Array<service_id>} - services in category


###makeplans.updateCategory( categoryId, params )

categoryId {number} - category id

params {object} - as above


###makeplans.deleteCategory( categoryId )

categoryId {number} - category to delete

##Users

###makeplans.getUsers()

###makeplans.createUsers(name, email)

this endpoint doesn't seem to work


##Slots

###makeplans.getAvailableSlots( serviceId, params)

serviceId {number} - service to check

params {from, to, selected_resources, only_free} - querystring options


###makeplans.getNextAvailableDate( serviceId, params )

serviceId {number} - service to check

params {from, selected_resources} - querystring options


##Bookings

###makeplans.getBookings( params? )

###makeplans.getRecentBookings( params? )

##makeplans.getUpcomingBookings( params? )

##makeplans.getAgenda( params? )

##makeplans.getUnconfirmedBookings( params? )

##makeplans.getAllBookings( params? )

service_id {number} - service to check event_id {number} - or event to check _resource_id {number} - resource _external_id {string} start {DateTime} - booked_from after param end {DateTime} - booked_to before param since {DateTime} - updated_at after param collection_id {UUID}


###makeplans.createBooking( params )


###createRecurringBooking( params )


###getOccurences( collectionId )

collectionId {number} - id of reccurring event


###verifyBooking( bookingId )

###confirmBooking( bookingId )

###declineBooking( bookingId )

###cancelBooking( bookingId )

###updateBooking( bookingId, params )

###deleteBooking( bookingId, params )


##People

##Services

##Events

You can’t perform that action at this time.