HypixelClient

class HypixelClient(apiKey: String, httpClient: OkHttpClient = OkHttpClient(), baseUrl: String = "https://api.hypixel.net/v2", defaultCacheDurationMinutes: Int = 1, autoRetry: Boolean = false, maxRetries: Int = 3)

A client for interacting with the Hypixel API.

This client handles authentication, rate limiting, and automatic retries. It uses Coroutines for asynchronous requests.

Parameters

apiKey

The Hypixel API key.

httpClient

The OkHttpClient instance to use for requests.

baseUrl

The base URL for the Hypixel API.

defaultCacheDurationMinutes

The duration for which successful responses should be cached.

autoRetry

Whether to automatically retry requests that fail due to rate limiting.

maxRetries

The maximum number of retries for rate-limited requests.

Constructors

Link copied to clipboard
constructor(apiKey: String, httpClient: OkHttpClient = OkHttpClient(), baseUrl: String = "https://api.hypixel.net/v2", defaultCacheDurationMinutes: Int = 1, autoRetry: Boolean = false, maxRetries: Int = 3)

Properties

Link copied to clipboard

The rate limit information from the last successful API request.

Functions

Link copied to clipboard

Retrieves the list of achievements. https://api.hypixel.net/v2/resources/achievements

Link copied to clipboard
suspend fun getAuction(uuid: String? = null, player: String? = null, profile: String? = null): AuctionsResponse

Searches for SkyBlock auctions by UUID, player, or profile. https://api.hypixel.net/v2/skyblock/auction

Link copied to clipboard
suspend fun getAuctions(page: Int = 0): AuctionsResponse

Retrieves active SkyBlock auctions. https://api.hypixel.net/v2/skyblock/auctions

Link copied to clipboard

Retrieves recently ended SkyBlock auctions. https://api.hypixel.net/v2/skyblock/auctions_ended

Link copied to clipboard
suspend fun getBazaar(): BazaarResponse

Retrieves current bazaar data. https://api.hypixel.net/v2/skyblock/bazaar

Link copied to clipboard
suspend fun getBingo(): BingoResponse

Retrieves the current SkyBlock bingo information. https://api.hypixel.net/v2/resources/skyblock/bingo

Link copied to clipboard

Retrieves the current boosters. https://api.hypixel.net/v2/boosters

Link copied to clipboard

Retrieves the list of challenges. https://api.hypixel.net/v2/resources/challenges

Link copied to clipboard

Retrieves the list of SkyBlock collections. https://api.hypixel.net/v2/resources/skyblock/collections

Link copied to clipboard
suspend fun getCounts(): CountsResponse

Retrieves the player counts across various games. https://api.hypixel.net/v2/counts

Link copied to clipboard

Retrieves the current SkyBlock election information. https://api.hypixel.net/v2/resources/skyblock/election

Link copied to clipboard

Retrieves current SkyBlock fire sales. https://api.hypixel.net/v2/skyblock/firesales

Link copied to clipboard
suspend fun getGames(): GamesResponse

Retrieves the list of games. https://api.hypixel.net/v2/resources/games

Link copied to clipboard
suspend fun getGarden(profileUuid: String): GardenResponse

Retrieves SkyBlock garden information for a profile. https://api.hypixel.net/v2/skyblock/garden

Link copied to clipboard

Retrieves the list of guild achievements. https://api.hypixel.net/v2/resources/guilds/achievements

Link copied to clipboard

Retrieves a guild by an id. https://api.hypixel.net/v2/guild

Link copied to clipboard
suspend fun getGuildByName(name: String): GuildResponse

Retrieves a guild by a name. https://api.hypixel.net/v2/guild

Link copied to clipboard

Retrieves a guild by a player. https://api.hypixel.net/v2/guild

Link copied to clipboard

Retrieves the currently active housing. https://api.hypixel.net/v2/housing/active

Link copied to clipboard

Retrieves information about a specific housing instance. https://api.hypixel.net/v2/housing/house

Link copied to clipboard

Retrieves the housing instances owned by a player. https://api.hypixel.net/v2/housing/houses

Link copied to clipboard
suspend fun getItems(): ItemsResponse

Retrieves the list of SkyBlock items. https://api.hypixel.net/v2/resources/skyblock/items

Link copied to clipboard

Retrieves the current leaderboards. https://api.hypixel.net/v2/leaderboards

Link copied to clipboard
suspend fun getMuseum(profileUuid: String): MuseumResponse

Retrieves SkyBlock museum information for a profile. https://api.hypixel.net/v2/skyblock/museum

Link copied to clipboard
suspend fun getNews(): NewsResponse

Retrieves SkyBlock news. https://api.hypixel.net/v2/skyblock/news

Link copied to clipboard
suspend fun getPlayer(uuid: String): PlayerResponse

Retrieves data of a specific player, including game stats. https://api.hypixel.net/v2/player

Link copied to clipboard
suspend fun getPlayerBingo(uuid: String): BingoResponse

Retrieves SkyBlock bingo data for a player. https://api.hypixel.net/v2/skyblock/bingo

Link copied to clipboard
suspend fun getProfile(uuid: String): ProfileResponse

Retrieves a specific SkyBlock profile by its UUID. https://api.hypixel.net/v2/skyblock/profile

Link copied to clipboard
suspend fun getProfiles(uuid: String): ProfilesResponse

Retrieves all SkyBlock profiles for a player. https://api.hypixel.net/v2/skyblock/profiles

Link copied to clipboard

Retrieves punishment statistics. https://api.hypixel.net/v2/punishmentstats

Link copied to clipboard
suspend fun getQuests(): QuestsResponse

Retrieves the list of quests. https://api.hypixel.net/v2/resources/challenges

Link copied to clipboard

Retrieves the recently played games of a specific player. https://api.hypixel.net/v2/recentgames

Link copied to clipboard
suspend fun getSkills(): SkillsResponse

Retrieves SkyBlock skills information. https://api.hypixel.net/v2/resources/skyblock/skills

Link copied to clipboard
suspend fun getStatus(uuid: String): OnlineResponse

Retrieves the current online status of a specific player. https://api.hypixel.net/v2/status

Link copied to clipboard

Retrieves the list of vanity companions. https://api.hypixel.net/v2/resources/vanity/companions

Link copied to clipboard

Retrieves the list of vanity pets. https://api.hypixel.net/v2/resources/vanity/pets