SupplyClient

A client for interacting with EG Lodging Connectivity Supply GraphQL API that exposes various lodging capabilities such as reservations, promotions, reviews, notifications, messaging, etc...

This client is configured with a ClientConfiguration that includes authentication details, and it automatically determines the appropriate API endpoints based on the environment (e.g., production or test).

In addition, this client can be configured to target the sandbox environment by passing ClientEnvironment.SANDBOX_PROD or ClientEnvironment.SANDBOX_TEST to the environment configuration option.

Parameters

config

The ClientConfiguration that includes API credentials and other optional parameters such as environment, timeouts, and logging masking options.

Example usage:

SupplyClient(
ClientConfiguration
.builder()
.key("API_KEY")
.secret("API_SECRET")
.build()
)

Constructors

Link copied to clipboard
constructor(config: ClientConfiguration)

Creates a new instance of SupplyClient using the provided configuration.

Functions

Link copied to clipboard
open override fun <T : Mutation.Data> execute(mutation: Mutation<T>): T

Executes a GraphQL mutation and returns the result.

open override fun <T : Query.Data> execute(query: Query<T>): T

Executes a GraphQL query and returns the result.