TibiaKtClient

open class TibiaKtClient(engine: HttpClientEngine?, userAgent: String? = null, additionalConfig: HttpClientConfig<*>.() -> Unit = {})(source)

A coroutine based client to fetch from Tibia.com.

Parameters

engine

The ktor client engine to use, by default CIO is used.

additionalConfig

Additional configuration for the Ktor Client.

Constructors

Link copied to clipboard
constructor(userAgent: String? = null, additionalConfig: HttpClientConfig<*>.() -> Unit = {})

Creates an instance of the client, using the default engine (CIO).

constructor(engine: HttpClientEngine?, userAgent: String? = null, additionalConfig: HttpClientConfig<*>.() -> Unit = {})

Functions

Link copied to clipboard
open suspend fun fetchAuction(auctionId: Int, skipDetails: Boolean = false, fetchItems: Boolean = false, fetchOutfits: Boolean = false, fetchMounts: Boolean = false): TibiaResponse<Auction?>

Fetch an auction from Tibia.com.

Link copied to clipboard
open suspend fun fetchBazaar(type: BazaarType = BazaarType.CURRENT, filters: BazaarFilters? = null, page: Int = 1): TibiaResponse<CharacterBazaar>

Fetch the character bazaar.

open suspend fun fetchBazaar(type: BazaarType = BazaarType.CURRENT, page: Int = 1, filterBuilder: BazaarFiltersBuilder.() -> Unit? = null): TibiaResponse<CharacterBazaar>

Fetch the character bazaar from Tibia.com.

Link copied to clipboard

Fetch the boosted boss of the day as well as the list of bosstable bosses from Tibia.com.

Link copied to clipboard
open suspend fun fetchCharacter(name: String): TibiaResponse<Character?>

Fetch a character.

Link copied to clipboard
open suspend fun fetchCMPostArchive(days: Int, page: Int = 0): TibiaResponse<CMPostArchive>

Fetch CM posts from today to the last specified days.

open suspend fun fetchCMPostArchive(startDate: LocalDate, endDate: LocalDate, page: Int = 0): TibiaResponse<CMPostArchive>

Fetch CM posts between two dates.

Link copied to clipboard

Fetch the creatures section, containing the boosted creature.

Link copied to clipboard

Fetch the events schedule for the current month.

open suspend fun fetchEventsSchedule(year: Int, month: Int): TibiaResponse<EventsSchedule>

Fetch the events schedule for a specific year and month.

Link copied to clipboard
open suspend fun fetchForumAnnouncement(announcementId: Int): TibiaResponse<ForumAnnouncement?>

Fetches a thread from the Tibia.com forum.

Link copied to clipboard
open suspend fun fetchForumBoard(boardId: Int, page: Int = 1, threadAge: Int? = null): TibiaResponse<ForumBoard?>

Fetches a board from the Tibia.com forum.

Link copied to clipboard
open suspend fun fetchForumPost(postId: Int): TibiaResponse<ForumThread?>

Fetches a forum thread containing the specified post.

Link copied to clipboard

Fetches a specific forum section.

open suspend fun fetchForumSection(sectionId: Int): TibiaResponse<ForumSection?>

Fetches a forum section by its internal sectionId.

Link copied to clipboard
open suspend fun fetchForumThread(threadId: Int, page: Int = 1): TibiaResponse<ForumThread?>

Fetches a forum thread from Tibia.com.

Link copied to clipboard
open suspend fun fetchGuild(name: String): TibiaResponse<Guild?>

Fetch a guild by its name.

Link copied to clipboard
open suspend fun fetchHighscoresPage(world: String?, category: HighscoresCategory, vocation: HighscoresProfession = HighscoresProfession.ALL, page: Int = 1, battlEyeType: HighscoresBattlEyeType = HighscoresBattlEyeType.ANY_WORLD, pvpTypes: Set<PvpType>? = null): TibiaResponse<Highscores?>

Fetch a page of the highscores.

Link copied to clipboard
open suspend fun fetchHigscores(world: String?, category: HighscoresCategory, vocation: HighscoresProfession = HighscoresProfession.ALL, battlEyeType: HighscoresBattlEyeType = HighscoresBattlEyeType.ANY_WORLD, pvpTypes: Set<PvpType>? = null): TibiaResponse<Highscores?>

Fetch the entire highscores.

Link copied to clipboard
open suspend fun fetchHouse(houseId: Int, world: String): TibiaResponse<House?>

Fetch a house by its houseId in a specific world.

Link copied to clipboard
open suspend fun fetchHousesSection(world: String, town: String, type: HouseType? = null, status: HouseStatus? = null, order: HouseOrder? = null): TibiaResponse<HousesSection?>

Fetch the houses section for a world and town.

Link copied to clipboard

Fetch the kill statistics for a world.

Link copied to clipboard
open suspend fun fetchLeaderboard(world: String, rotation: Int? = null, page: Int = 1): TibiaResponse<Leaderboard?>

Fetches the Tibia Drome leaderboards for a world.

Link copied to clipboard
open suspend fun fetchNews(newsId: Int): TibiaResponse<News?>

Fetch a specific news article by its newsId.

Link copied to clipboard
open suspend fun fetchRecentNews(days: Int = 30, categories: Set<NewsCategory>? = null, types: Set<NewsType>? = null): TibiaResponse<NewsArchive>

Fetch the news from today to the last provided days.

open suspend fun fetchRecentNews(startDate: LocalDate, endDate: LocalDate, categories: Set<NewsCategory>? = null, types: Set<NewsType>? = null): TibiaResponse<NewsArchive>

Fetch the news for a given interval.

Link copied to clipboard
open suspend fun fetchWorld(name: String): TibiaResponse<World?>

Fetch a world's information.

Link copied to clipboard

Fetch active and in formation guilds in a world.

Link copied to clipboard

Fetch the world overview, containing the list of worlds.

Link copied to clipboard
open suspend fun request(method: HttpMethod, url: String, data: List<Pair<String, Any>> = emptyList(), headers: List<Pair<String, Any>> = emptyList()): HttpResponse

Perform a request using the required headers.