Setting up the XAP SDK
Software development kits make integration simple so you can quickly get products to market
1. Set up a Java development environment
Your development environment needs to have Java 8 or later. You can use Apache Maven or Gradle to configure SDK dependencies for your projects.
2. Create a service client and configure credentials
All API requests must be authenticated using your API client ID and secret. Create a XapClient
and configure it with your credentials.
XapClient xapClient =
XapClient
.builder()
.key("KEY")
.secret("SECRET")
.build();
3. Build request operation and make API calls
Build your request object using the classes defined in the SDK, and use the service client to make the API call using it.
GetLodgingListingsOperationParams getLodgingListingsOperationParams
= GetLodgingListingsOperationParams
.builder()
.partnerTransactionId("PARTNER TRANSACTION ID")
.locationKeyword("LOCATION KEYWORD")
.build();
GetLodgingListingsOperation getLodgingListingsOperation =
new GetLodgingListingsOperation(getLodgingListingsOperationParams);
Response<HotelListingsResponse> hotelListingsResponse =
client.execute(getLodgingListingsOperation);
Need more information? Check out our usage examples. To get better insight into your API calls, configure logging.