npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

booking_client

v1.0.0

Published

Partner Connect API Service

Downloads

12

Readme

BookingClient TypeScript SDK 1.0.0

Welcome to the BookingClient SDK documentation. This guide will help you get started with integrating and using the BookingClient SDK in your project.

Versions

  • API version: 1.0
  • SDK version: 1.0.0

About the API

Partner Connect API Service

Table of Contents

Setup & Configuration

Supported Language Versions

This SDK is compatible with the following versions: TypeScript >= 4.8.4

Installation

To get started with the SDK, we recommend installing using npm:

npm install booking_client

Authentication

Access Token Authentication

The BookingClient API uses an Access Token for authentication.

This token must be provided to authenticate your requests to the API.

Setting the Access Token

When you initialize the SDK, you can set the access token as follows:

const sdk = new BookingClient({ token: 'YOUR_TOKEN' });

If you need to set or update the access token after initializing the SDK, you can use:

const sdk = new BookingClient();
sdk.token = 'YOUR_TOKEN';

API Key Authentication

The BookingClient API uses API keys as a form of authentication. An API key is a unique identifier used to authenticate a user, developer, or a program that is calling the API.

Setting the API key

When you initialize the SDK, you can set the API key as follows:

const sdk = new BookingClient({ apiKey: 'YOUR_API_KEY' });

If you need to set or update the API key after initializing the SDK, you can use:

const sdk = new BookingClient();
sdk.apiKey = 'YOUR_API_KEY';

Services

The SDK provides various services to interact with the API.

| Name | | :------------------------------------------------------------------------------------- | | DemandApiV3CompatibleService | | DemandApiV2CompatibleService |

Models

The SDK includes several models that represent the data structures used in API requests and responses. These models help in organizing and managing the data efficiently.

| Name | Description | | :--------------------------------------------------------------------------------------------------------------- | :-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | | SearchInputDto | | | ResponseOutputListSearchOutputDto | | | SearchAccept | | | DetailsInputDto | | | ResponseOutputListDetailsOutputDto | | | PostDetailsAccept | | | ConstantInputDto | | | ResponseOutputConstantsOutputDto | | | GetAccommodationConstantsAccept | | | ResponseOutputV2ReviewScoresOutputDto | | | ReviewScoresInputDto | | | GetHotelsReviewScoresAccept | | | ResponseOutputV2HotelsOutputDto | | | HotelsInputDto | | | GetHotelsAccept | | | ResponseOutputV2HotelTypesOutputDto | | | HotelTypeInputDto | | | GetHotelTypesAccept | | | ResponseOutputV2HotelThemeTypesOutputDto | | | HotelThemeTypeInputDto | | | GetHotelThemeTypesAccept | | | ResponseOutputV2HotelFacilityTypeOutputDto | | | HotelFacilityInputDto | | | GetRoomFacilityTypesAccept | | | ResponseOutputV2HotelAvailabilityOutputDto | | | HotelAvailabilityInputDto | | | GetHotelAvailabilityAccept | | | ResponseOutputV2BlockAvailabilityOutputDto | | | BlockAvailabilityInputDto | | | GetBlockAvailabilityAccept | | | BookerInputDto | The booker's information. | | GuestsInputDto | The guest details for the request. | | SearchInputDtoExtras | Input parameter to request for additional information about the products. | | Coordinates | Limit the result list to the specified coordinates. | | Platform | The booker platform for showing the platform based deals and prices. | | TravelPurpose | The travel purpose of the booker. | | UserGroups | The user groups that the booker is a member of. | | AllocationInputDto | The exact allocation of guests to rooms. | | SearchOutputDto | | | PriceDataDtoDouble | The price components of this product or selection of products. 'base' and 'extra_charges' are returned only when explicitly requested (via 'extras=extra_charges'). | | ProductDto | | | ExtraChargesDtoDouble | The charge breakdown. Includes taxes and fees. | | PoliciesDto | The policies for this product. | | PriceDataDtoListChargeDto | The price components of this product or selection of products. 'base' and 'extra_charges' are returned only when explicitly requested (via 'extras=extra_charges'). | | DealDto | This specifies the deal tagging for the product. | | CancellationDto | The cancellation policy for this product. | | MealPlanDto | The meal plan policy for this product. | | PaymentDto | Payment terms and conditions for this product. | | Type_ | The cancellation scheme supported by this product. | | Meals | The meals included in the meal plan. | | Plan | The meal plan included in this product. | | PaymentTypes | | | ExtraChargesDtoListChargeDto | The charge breakdown. Includes taxes and fees. | | ChargeDto | | | Mode | | | Tags | | | DetailsInputDtoExtras | Input parameter to request for additional information about the accommodation property. It should be passed as a JSON array with one or more items. | | DetailsInputDtoLanguages | An IETF language tag code that uniquely identifies a supported human language or dialect as described here: https://en.wikipedia.org/wiki/IETF_language_tag. Note that in in demand-api-v3-compatible the whole tag is always lowercase. Examples: "nl" for Dutch/Nederlands or "en-us" for English (US). | | DetailsOutputDto | | | TranslatedString | Translated description of this room. The maximum number of characters returned may be limited by contract. | | CheckinCheckoutTimesDto | | | ContactsDto | Contact information of the accommodation. | | FacilityDto | The list of facilities available in this property. Requires {"extras":["facilities"]}. | | DescriptionDto | Textual information about the accommodation. Requires {"extras":["description"]}. | | KeyCollectionInformationDto | | | LocationDto | All location related information of this accommodation property. | | PhotoDto | | | ProgramSettingsDto | Details of programmes undergone by the property. | | RatingDto | | | RoomDto | The list of room types available at this property. Requires {"extras":["rooms"]}. | | LocalTime | The time till when checkout can be done at this property. | | ContactDto | Contact information of the accommodation. It can be null if the data is missing. | | FacilityDtoAttributes | List of optional attributes for this facility. | | TranslationInformation | Text containing important information about the property. The value is translated in the requested languages. | | TruncatedString | The translated description text of this accommodation property in the requested languages. The maximum number of characters returned may be limited by contract. | | AlternativeKeyLocationDto | Alternate location to collect the key of this accommodation property. This is returned if the key to access the property is in another location. | | LazyTranslatedString | Translated accommodation address. | | CoordinatesDto | A signed integer number that uniquely identifies a city. | | PhotoUrlDto | | | StarsType | An enumerated value describing which type of stars this accommodation has. | | RoomDtoAttributes | Lists a set of attribute qualifiers for this room. Will not be returned if no relevant attributes are applicable. | | BedOptionDto | Lists all possible bedding options for this room or apartment. | | CribsAndExtraBedsDto | Lists room options regarding adding cribs and/or extra beds. | | RoomMaximumOccupancyDto | Occupancy limits and options. | | NumberOfRoomsDto | Total rooms available. | | BedConfigurationDto | Lists all alternative bed configurations that are supported. | | BedDto | Detail list of all different types and number of beds included in this configuration. | | Constants | Allows to filter the results only for specific sections. | | ConstantInputDtoLanguages | | | Meta | | | ReviewScoresOutputDto | | | ScoreBreakdown | A breakdown of scores per reviewer type and review question. | | ScoreDistribution | A breakdown of all review scores into buckets 1 - 10. | | QuestionDto | Review scores per question. | | ReviewScoresInputDtoLanguage | Code of the language used to render response. Please check the "Possible Values" section of the documentation for the accepted language codes. | | ReviewerType | Limits reviews to those written by specific reviewer type. | | HotelsOutputDto | | | HotelDataDto | Hotel specific information. | | RoomDataDto | This block has room data for this hotel. | | HotelPhotoDto | Photos specific information of the hotel. | | RoomInfoDto | | | BedroomDto | | | RoomOccupancyDto | | | RoomSizeDto | | | HotelsInputDtoLanguage | The language code to return the results in. Please check the "Possible Values" section of the documentation for the accepted language codes. | | HotelsInputDtoExtras | Returns extra bits of information about hotels. | | HotelTypesOutputDto | | | TranslationDto | | | HotelTypeInputDtoLanguages | Limit the results to these languages. Please check the "Possible Values" section of the documentation for the accepted language codes. | | HotelThemeTypesOutputDto | | | HotelFacilityTypeOutputDto | | | HotelFacilityInputDtoLanguages | Limit the results to these languages. Please check the "Possible Values" section of the documentation for the accepted language codes. | | HotelAvailabilityOutputDto | | | HotelAvailabilityInputDtoUserPlatform | The user's platform. | | BlockAvailabilityOutputDto | | | BlockOutputDto | The object containing all the relevant information for the combination of room, policy, meal and occupancy that determines the price." A block is the unique entity you book with booking.com. | | BlockAvailabilityInputDtoExtras | The extra items for this request. See the documentation for more details about each extra. | | BlockAvailabilityInputDtoLanguage | Specify the language for: block_id, policies, room texts and hotel descriptions. Note: not all text is translated in all languages. Please check the "Possible Values" section of the documentation for the accepted language codes. | | BlockAvailabilityInputDtoUserPlatform | The user's platform. |

License

This SDK is licensed under the MIT License.

See the LICENSE file for more details.