@varandas/clash-royale-api
Version:
A Clash Royale API official wrapper for seamless integration with your applications.
65 lines (64 loc) • 2.43 kB
TypeScript
import { AxiosInstance } from 'axios';
import { IClan, IClanDetails, IClanMember, IClanRequestParams, ICurrentWar, IWarlog } from '../interfaces';
import { ICurrentRiverRace } from '../interfaces/river_race.interface';
/**
* NOTE From the DOCS:
* https://developer.clashroyale.com/#/documentation
*
* Search all clans by name and/or filtering the results using various criteria.
* At least one filtering criteria must be defined and if name is used as part
* of search, it is required to be at least three characters long.
*
* It is not possible to specify ordering for results so clients should not
* rely on any specific ordering as that may change in the future releases of the API.
*
* @param {IClanRequestParams} params
* @param {AxiosInstance} apiClient
*/
declare const getClans: (params: IClanRequestParams, apiClient: AxiosInstance) => Promise<IClan[]>;
/**
* Get information about a single clan by clan tag. Clan tags can be found using
* clan search operation.
*
* Note that clan tags start with hash character '#' and that needs to be
* URL-encoded properly to work in URL, so for example clan tag '#2ABC' would
* become '%232ABC' in the URL.
*
* @param {string} tag
* @param {AxiosInstance} apiClient
*/
declare const getClanByTag: (tag: string, apiClient: AxiosInstance) => Promise<IClanDetails>;
/**
* List clan members
*
* @param {string} tag
* @param {AxiosInstance} apiClient
*/
declare const getClanMembers: (tag: string, apiClient: AxiosInstance) => Promise<IClanMember[]>;
/**
* Retrieve clan's clan war log
*
* @param {string} tag
* @param {AxiosInstance} apiClient
*/
declare const getClanWarlog: (tag: string, apiClient: AxiosInstance) => Promise<IWarlog[]>;
/**
* Retrieve information about clan's current clan war
*
* Note:
* When ICurrentWar.warEndTime is undefined, the war is still in collection.
* Search for ICurrentWar.collectionEndTime instead
*
* @param {string} tag
* @param {AxiosInstance} apiClient
*/
declare const getClanCurrentWar: (tag: string, apiClient: AxiosInstance) => Promise<ICurrentWar>;
/**
* Retrieve information about clan's current river race
*
*
* @param {string} tag
* @param {AxiosInstance} apiClient
*/
declare const getClanCurrentRiverRace: (tag: string, apiClient: AxiosInstance) => Promise<ICurrentRiverRace>;
export { getClans, getClanByTag, getClanMembers, getClanWarlog, getClanCurrentWar, getClanCurrentRiverRace, };