1.0.1 • Published 9 years ago
expedia-quickconnect v1.0.1
Expedia QuickConnect Client
Client to work with Expedia's QuickConnect API
Installation
Using NPM
$ npm i expedia-quickconnect -SAPI
The client requires a username, a password, and the different endpoints by default.
import ExpediaClient from 'expedia-quickconnect';
const client = ExpediaClient('username', 'password', { bookingsEndpointUri: 'SOME_URL'});To ease development there is a 'testing' mode.
import ExpediaClient from 'expedia-quickconnect';
const client = ExpediaClient('username', 'password', { testing: true });Booking Retrievals
Interact with bookings from Expedia. The testing endpoint is: https://simulator.expediaquickconnect.com/connect/br
bookings.all() : Promise
Retrieves the last 250 max listings
Example
import ExpediaClient from 'expedia-quickconnect';
const client = ExpediaClient('username', 'password', { testing: true });
client.bookings.all()
.then(response => {
// Do something with response
});bookings.allByHotel(hotelId) : Promise
Retrieves the bookings filtered by the booking Id
| Parameter | Type | Description |
|---|---|---|
| hotelId | Number | Hotel's Id |
Example
import ExpediaClient from 'expedia-quickconnect';
const client = ExpediaClient('username', 'password', { testing: true });
client.bookings.allByHotel(111)
.then(response => {
// Do something with response
});bookings.allByPreviousDays(previousDays) : Promise
| Parameter | Type | Description |
|---|---|---|
| previousDays | Number | The number of days in the past. Must be between 1 and 30 |
import ExpediaClient from 'expedia-quickconnect';
const client = ExpediaClient('username', 'password', { testing: true });
client.bookings.allByPreviousDays(5)
.then(response => {
// Do something with response
});bookings.allByStatus(status) : Promise
| Parameter | Type | Description |
|---|---|---|
| status | Enum(String) | Booking status. Must be: pending, retrieved, comfirmed |
import ExpediaClient from 'expedia-quickconnect';
const client = allByStatus('username', 'password', { testing: true });
const status = client.booking.Status;
client.bookings.allByStatus(status.confirmed)
.then(response => {
// Do something with response
});Roadmap
- Booking Confirmations
- Availability and Rates
- Product Availability and Rates