Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add lodging id search examples #26

Merged
merged 7 commits into from
Dec 3, 2024
Merged
Show file tree
Hide file tree
Changes from 2 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions examples/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,14 +17,21 @@ Currently, the following scenarios are included:
This example demonstrates how to search for properties with a location keyword with filters
applied in Lodging Listings API.

- [`ListingsHotelIdsSearchScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/ListingsHotelIdsSearchScenario.java):

This example demonstrates how to retrieve accessible property ids and location content from
SDP DownloadURL API and then get the prices of these properties using the Lodging Listings API.

- [`QuotesQuickStartScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/QuotesQuickStartScenario.java):

This example demonstrates how to search for property quotes with property IDs in Lodging Quotes API.
This example demonstrates how to retrieve accessible Vrbo property ids and location content from
SDP DownloadURL API and then get the prices of these properties using the Lodging Quotes API.

- [
`AvailabilityCalendarsQuickStartScenario.java`](src/main/java/com/expediagroup/sdk/xap/examples/scenarios/lodging/AvailabilityCalendarsQuickStartScenario.java):

This example demonstrates how to search for availability calendars with property IDs in Lodging Availability Calendar API.
This example demonstrates how to use Availability Calendar api with simple search.
In terms of how to get property Ids, you can refer to `QuotesQuickStartScenario.java`.

We are continuously adding more scenarios to demonstrate the usage of other XAP APIs.

Expand Down
8 changes: 7 additions & 1 deletion examples/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<maven.compiler.source>1.8</maven.compiler.source>
<maven.compiler.target>1.8</maven.compiler.target>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<xap-java-sdk.sdk.version>0.0.15-SNAPSHOT</xap-java-sdk.sdk.version>
<xap-java-sdk.sdk.version>0.0.17-SNAPSHOT</xap-java-sdk.sdk.version>
</properties>

<repositories>
Expand Down Expand Up @@ -65,6 +65,12 @@
<artifactId>log4j-slf4j2-impl</artifactId>
<version>2.23.1</version>
</dependency>

<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.18.1</version>
</dependency>
</dependencies>

<build>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,16 @@
import com.expediagroup.sdk.xap.models.AvailabilityCalendarResponse;
import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperation;
import com.expediagroup.sdk.xap.operations.GetLodgingAvailabilityCalendarsOperationParams;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import java.util.Arrays;
import java.util.HashSet;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
* This example demonstrates how to use Availability Calendar api with simple search.
* Note: this is a Vrbo scenario. You need a key that is enabled for Vrbo brand to run this.
* In terms of how to get property Ids, you can refer to {@link QuotesQuickStartScenario}.
*
* <p>Note: this is a Vrbo scenario. You need a key that is enabled for Vrbo brand to run this.
*/
public class AvailabilityCalendarsQuickStartScenario implements VrboScenario {

Expand Down
Loading