Reservations

Reservations

new Reservations(okdk)

Source:

Set up Reservations module.

Parameters:
Name Type Description
okdk Object

OKDk module instance.

Methods

getReservationInfo(id) → {Promise}

Source:

Wrapper for Reservations' getReservation method.

Parameters:
Name Type Description
id id

Id of the reservation to query.

Returns:

reservationInfo - Promise that resolves to an JSON object containing info of the reservation.

Type
Promise

reserve(houseId, checkIn, checkOut) → {Promise}

Source:

Wrapper for Reservations' reserve method.

Parameters:
Name Type Description
houseId int

Id of the house to reserve.

checkIn int

Time of checkin, in milliseconds since UNIX epoch.

checkOut int

Time of checkOut, in milliseconds since UNIX epoch.

Returns:

newId - Promise that resolves to id of the new house.

Type
Promise