Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@leisurelink/dreamcatcher-client

Package Overview
Dependencies
Maintainers
23
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@leisurelink/dreamcatcher-client

node.js client for adaptor calls to the public api

  • 0.0.5-fix-for-bdc
  • latest
  • npm
  • Socket score

Version published
Maintainers
23
Created
Source

dreamcatcher-client

node.js client for adaptor calls to the public api

Package.json

"dreamcatcher-client": "git+ssh://git@github.com/LeisureLink/dreamcatcher-client.git#master"

Initializing the client

Before making any calls to the dreamcatcher API using the client, it must be initialized with the API key, URL of the correct API (dev or prod) you wish to access, and an optional timeout value through the init method.

var dreamcatcher_client = require('dreamcatcher-client');
dreamcatcher_client.init(apiKey, baseURL, timeout);

Using the client

The dreamcatcher client supports all of the calls detailed in the LeisureLink Integration Hub API and Public Distribution API documentation:

LeisureLink Integration Hub API
LeisureLink Public Distribution API

Calls follow a standard format:

dreamcatcher_client.*httpverbTypeOfInformation*(id, queryParams, body, callback)

where only the relevant parameters are included. For example:

dreamcatcher_client.getAvailability(rentalUnitId, queryParams, callback);

For a full listing of available methods and their signatures, see below.

queryParams is simply an object containing key(s) for each query parameter associated with the call and their appropriate value. Continuing the getAvailability example, you might pass in the following for queryParams:

{
  days: 180
}

To see what parameters are available for each call, please refer to the API documentation linked above.

Methods

$.init(apiKey, baseUrl, timeout)

$.getRentalUnitDetail(rentalUnitId, callback)
$.getRentalUnitList(queryParams, callback)

$.getAvailability(rentalUnitId, queryParams, callback)
$.postAvailability(rentalUnitId, body, callback)
$.postCheckAvailability(rentalUnitId, body, callback)

$.getBaseRates(rentalUnitId, body, callback)
$.postBaseRates(rentalUnitId, body, callback)

$.getStayRestrictions(rentalUnitId, callback)
$.postStayRestrictions(rentalUnitId, body, callback)

$.getBooking(bookingId, callback)
$.postQuote(body, callback)
$.postBooking(body, callback)
$.postBookingCancellation(bookingId, body, callback)

$.getCheckInInformation(rentalUnitId, callback)

$.getHubBooking(hubBookingId, callback)
$.postHubBooking(hubBookingId, callback)
$.postHubBookingConfirmation(hubBookingId, body, callback)
$.postHubBookingFailure(hubBookingId, body, callback)
$.postHubBookingCancellation(hubBookingId, body, callback)
$.postHubBookingCancellationConfirmation(hubBookingId, body, callback)

$.getSpecials(rentalUnitId, callback)
$.putSpecial(specialId, body, callback)

$.getUpdateLog(queryParams, callback)

FAQs

Package last updated on 13 Apr 2016

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc