Gw2ApiClient

expect class Gw2ApiClient @InternalGw2ApiClientApi constructor(httpClient: IHttpClient, host: String, authenticationStrategy: AuthenticationStrategy, cacheAccess: CacheAccess?, rateLimiter: RateLimiter?, json: Json, requestConfigurers: List<RequestConfigurer>)

A client that may be used to make requests to the official Guild Wars 2 API (or a mirror).

Since

0.5.0

Parameters

httpClient

the HTTP client implementation to use

host

the host of the API

cacheAccess

the cache implementation to use

rateLimiter

the rate-limiter to use

json

the Json instance used for deserialization

actual class Gw2ApiClient @InternalGw2ApiClientApi constructor(httpClient: IHttpClient, host: String, authenticationStrategy: AuthenticationStrategy, cacheAccess: CacheAccess?, rateLimiter: RateLimiter?, json: Json, requestConfigurers: List<RequestConfigurer>) : AutoCloseable
actual class Gw2ApiClient @InternalGw2ApiClientApi constructor(httpClient: IHttpClient, host: String, authenticationStrategy: AuthenticationStrategy, cacheAccess: CacheAccess?, rateLimiter: RateLimiter?, json: Json, requestConfigurers: List<RequestConfigurer>) : AutoCloseable

Constructors

Link copied to clipboard
expect constructor(httpClient: IHttpClient, builder: Gw2ApiClientBuilder)
expect constructor(httpClient: IHttpClient, host: String, authenticationStrategy: AuthenticationStrategy, cacheAccess: CacheAccess?, rateLimiter: RateLimiter?, json: Json, requestConfigurers: List<RequestConfigurer>)
actual constructor(httpClient: IHttpClient, builder: Gw2ApiClientBuilder)
actual constructor(httpClient: IHttpClient, host: String, authenticationStrategy: AuthenticationStrategy, cacheAccess: CacheAccess?, rateLimiter: RateLimiter?, json: Json, requestConfigurers: List<RequestConfigurer>)
actual constructor(httpClient: IHttpClient, builder: Gw2ApiClientBuilder)
actual constructor(httpClient: IHttpClient, host: String, authenticationStrategy: AuthenticationStrategy, cacheAccess: CacheAccess?, rateLimiter: RateLimiter?, json: Json, requestConfigurers: List<RequestConfigurer>)

Functions

close
Link copied to clipboard
open override fun close()
open override fun close()
Link copied to clipboard
Link copied to clipboard
expect suspend fun <T> executeAsync(template: RequestTemplate<T>): Gw2ApiResponse<T>

Asynchronously executes the given request.

actual suspend fun <T> executeAsync(template: RequestTemplate<T>): Gw2ApiResponse<T>
actual suspend fun <T> executeAsync(template: RequestTemplate<T>): Gw2ApiResponse<T>