Package-level declarations

Types

Link copied to clipboard
sealed interface BackoffStrategy

Controls the delay between retry attempts.

Link copied to clipboard
data class ExponentialBackoff(val base: Double = 2.0, val baseDelayMs: Long, val maxDelayMs: Long, val randomizationMs: Long) : BackoffStrategy

Applies exponential backoff between retry attempts.

Link copied to clipboard

PUBG Game Mode used for leaderboards and stats

Link copied to clipboard

No delay between retry attempts. Retries are issued immediately.

Link copied to clipboard
data object NoRetry : RetryPolicy

Disables all retry behavior. Failed requests will propagate immediately.

Link copied to clipboard

PUBG Platform shard

Link copied to clipboard

PUBG Platform Region shard

Link copied to clipboard
class PubgApi @JvmOverloads constructor(apiKey: String, rateLimiter: RateLimiter = DelayRateLimiter(), retry: RetryPolicy = NoRetry)

Entry point for all PUBG API interactions.

Link copied to clipboard

Marks an API for internal use only.

Link copied to clipboard
data class Retry(val maxRetries: Int = 5, val backoff: BackoffStrategy = NoBackoff, val retryOnExceptions: List<KClass<out Throwable>> = emptyList()) : RetryPolicy

Enables automatic retries for failed HTTP requests.

Link copied to clipboard
sealed interface RetryPolicy

Defines the retry behavior for failed HTTP requests made by PubgApi.

Link copied to clipboard
data class Season(val id: String, val isCurrentSeason: Boolean, val isOffSeason: Boolean)

Functions

Link copied to clipboard

Returns the current season among a list of available Season or null.

Link copied to clipboard
suspend fun PubgApi.isUp(): Boolean

Returns the status of the PUBG API.

Link copied to clipboard
suspend fun PubgApi.seasons(platform: Platform = Platform.STEAM): List<Season>

Returns the list of available Season by platform.

suspend fun PubgApi.seasons(platformRegion: PlatformRegion = PlatformRegion.PC_SA): List<Season>

Returns the list of available Season by platform-region.