This repository contains examples of how to use the Expedia Group Rapid Java SDK. The examples are written in Java and use Maven for dependency management.
The example implementation provided in the examples package demonstrates different scenarios utilizing various RAPID APIs through the SDK:
The scenarios below specifically demonstrate the usage of booking APIs:
1.SingleRoomBookScenario.java: This example demonstrates the process of booking a single room. It includes steps like getting property availability, checking room prices, and finally booking a room.
2.MultiRoomHoldAndResumeBookScenario.java: This example demonstrates how to hold multiple rooms for booking and then resume the booking process. It includes steps like creating a booking with hold, resuming the booking process, and verifying the booking has been resumed properly.
More scenarios are included in the examples package to demonstrate the usage of other RAPID APIs.
- Ensure you have a valid API key and secret from Expedia Group. Check Getting started with RAPID for more info.
- Java 1.8 or higher
- Maven
- Clone the repository.
- Navigate to the project directory
examples. - Replace the placeholders
your_api_keyandyour_api_secretin theRapidServiceclass with your actual API key and secret. - Run
mvn clean installto build the project and install the dependencies including the RAPID SDK.
To run the examples, run the application RapidSdkDemoApplication.java. This application runs a series of scenarios demonstrating various functionalities of the RAPID SDK. To run a specific scenario, use the below code snippet:
SomeScenario someScenario = new SomeScenario();
someScenario.setProfile(new DefaultRapidPartnerProfile());
someScenario.run();This project is licensed under the Apache License v2.0 - see the LICENSE for details.