Skip to content

Latest commit

 

History

History

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 
 
 

README.md

Rapid Java SDK Examples

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.

Examples

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.

Requirements

  • 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

Setup

  1. Clone the repository.
  2. Navigate to the project directory examples.
  3. Replace the placeholders your_api_key and your_api_secret in the RapidService class with your actual API key and secret.
  4. Run mvn clean install to build the project and install the dependencies including the RAPID SDK.

Running the Examples

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();

License

This project is licensed under the Apache License v2.0 - see the LICENSE for details.