Client

open class Client(email: String, password: String, clientConfiguration: ClientConfiguration.() -> Unit = {})

Client class is used to interact with the Clash of Clans API.

This class provides methods to interact with the Clash of Clans API by making HTTP requests using the provided requestHandler. It encapsulates the logic for making specific API calls and handling the response data.

Parameters

email

The email used for authentication.

password

The password used for authentication.

clientConfiguration

The configuration for the client.

Inheritors

Constructors

Link copied to clipboard
constructor(email: String, password: String, clientConfiguration: ClientConfiguration.() -> Unit = {})

Functions

Link copied to clipboard
suspend fun getBuilderBaseLeague(leagueId: Int, pagination: PaginationQuery = PaginationQuery()): Deferred<SimpleLeague>

Retrieves information about a specific Builder Base league based on the provided leagueId.

Link copied to clipboard
suspend fun getBuilderBaseLeagues(pagination: PaginationQuery = PaginationQuery()): Deferred<SimpleLeagueList>

Retrieves the list of Builder Base leagues.

Link copied to clipboard
suspend fun getCapitalLeague(leagueId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<SimpleLeague>

Retrieves detailed information about a specific capital league based on the provided leagueId.

Link copied to clipboard
suspend fun getCapitalLeagues(pagination: PaginationQuery = PaginationQuery()): Deferred<SimpleLeagueList>

Retrieves a list of capital leagues.

Link copied to clipboard
suspend fun getClan(clanTag: String): Deferred<Clan>

Retrieves detailed information about a clan based on the provided clanTag.

Link copied to clipboard
suspend fun getClanCapitalRaidSeasons(clanTag: String, pagination: PaginationQuery = PaginationQuery()): Deferred<ClanCapitalRaidSeasons>

Retrieves the capital raid seasons of a clan based on the provided clanTag.

Link copied to clipboard
suspend fun getClanCurrentWar(clanTag: String): Deferred<ClanWar>

Retrieves the current war of a clan based on the provided clanTag.

Link copied to clipboard
suspend fun getClanLabels(pagination: PaginationQuery = PaginationQuery()): Deferred<LabelList>

Retrieves a list of clan labels.

Link copied to clipboard
suspend fun getClanMembers(clanTag: String, pagination: PaginationQuery = PaginationQuery()): Deferred<ClanMemberList>

Retrieves the list of members in a clan based on the provided clanTag.

Link copied to clipboard
suspend fun getClanWarLeagueGroup(clanTag: String): Deferred<ClanWarLeagueGroup>

Gets the Clan War League group for the clan specified by clanTag.

Link copied to clipboard
suspend fun getClanWarLeagueWar(warTag: String): Deferred<ClanWar>

Gets the Clan War League war specified by warTag.

Link copied to clipboard
suspend fun getClanWarLog(clanTag: String, pagination: PaginationQuery = PaginationQuery()): Deferred<ClanWarLog>

Retrieves the war log of a clan based on the provided clanTag.

Link copied to clipboard
suspend fun getCurrentGoldPass(): Deferred<GoldPassSeason>

Retrieves the current Gold Pass season information.

Link copied to clipboard
suspend fun getLeague(leagueId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<League>

Retrieves detailed information about a specific league based on the provided leagueId.

Link copied to clipboard
suspend fun getLeagues(pagination: PaginationQuery = PaginationQuery()): Deferred<LeagueList>

Retrieves a list of leagues.

Link copied to clipboard
suspend fun getLeagueSeasonRanking(leagueId: String, seasonId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<PlayerRankingList>

Retrieves the ranking of players for a specific league season based on the provided leagueId and seasonId.

Link copied to clipboard
suspend fun getLeagueSeasons(leagueId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<LeagueSeasonList>

Retrieves a list of seasons for a specific league based on the provided leagueId.

Link copied to clipboard
suspend fun getLocation(locationId: String): Deferred<Location>

Retrieves information about a specific location based on the provided locationId.

Link copied to clipboard
suspend fun getLocationCapitalRanking(locationId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<ClanCapitalRankingList>

Retrieves the list of clans ranked in the Capital for a specific location based on the provided locationId.

Link copied to clipboard
suspend fun getLocationClanBuilderBaseRanking(locationId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<ClanBuilderBaseRankingList>

Retrieves the list of clans ranked in the Builder Base for a specific location based on the provided locationId.

Link copied to clipboard
suspend fun getLocationClanRanking(locationId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<ClanRankingList>

Retrieves the list of clans ranked in a specific location based on the provided locationId.

Link copied to clipboard
suspend fun getLocationPlayerBuilderBaseRanking(locationId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<PlayerBuilderBaseRankingList>

Retrieves the list of players ranked in the Builder Base for a specific location based on the provided locationId.

Link copied to clipboard
suspend fun getLocationPlayerRanking(locationId: String, pagination: PaginationQuery = PaginationQuery()): Deferred<PlayerRankingList>

Retrieves the list of players ranked in a specific location based on the provided locationId.

Link copied to clipboard
suspend fun getLocations(pagination: PaginationQuery = PaginationQuery()): Deferred<LocationList>

Retrieves the list of available locations.

Link copied to clipboard
suspend fun getPlayer(playerTag: String): Deferred<Player>

Retrieves detailed information about a player based on the provided playerTag.

Link copied to clipboard
suspend fun getPlayerLabels(pagination: PaginationQuery = PaginationQuery()): Deferred<LabelList>

Retrieves a list of player labels.

Link copied to clipboard
suspend fun getWarLeague(leagueId: Int, pagination: PaginationQuery = PaginationQuery()): Deferred<SimpleLeague>

Retrieves information about a specific War League based on the provided leagueId.

Link copied to clipboard
suspend fun getWarLeagues(pagination: PaginationQuery = PaginationQuery()): Deferred<SimpleLeagueList>

Retrieves the list of War Leagues.

Link copied to clipboard
suspend fun login()

Performs login into the Clash of Clans developer website using the provided credentials.

Link copied to clipboard
suspend fun searchClan(searchClanQuery: SearchClanQuery): Deferred<ClanList>

Searches for clans based on the provided searchClanQuery.