UNPKG

@varandas/clash-royale-api

Version:

A Clash Royale API official wrapper for seamless integration with your applications.

30 lines (29 loc) 1.12 kB
import { AxiosInstance } from 'axios'; import { IBattleLog, IChest, IPlayer } from '../interfaces'; /** * Get information about a single player by player tag. * Player tags can be found either in game or by from clan member lists. * * Note that player tags start with hash character * '#' and that needs to be URL-encoded properly to work in URL, * so for example player tag '#2ABC' would become '%232ABC' in the URL. * * @param {string} tag * @param {AxiosInstance} apiClient */ declare const getPlayerByTag: (tag: string, apiClient: AxiosInstance) => Promise<IPlayer>; /** * Get list of reward chests that the player will receive next in the game. * * @param {string} tag * @param {AxiosInstance} apiClient */ declare const getPlayerUpcomingChests: (tag: string, apiClient: AxiosInstance) => Promise<IChest[]>; /** * Get list of recent battle results for a player. * * @param {string} tag * @param {AxiosInstance} apiClient */ declare const getPlayerBattleLog: (tag: string, apiClient: AxiosInstance) => Promise<IBattleLog[]>; export { getPlayerByTag, getPlayerUpcomingChests, getPlayerBattleLog };