@leoua/coc-api
Version:
Yet another Clash of Clans API, but with TS support
14 lines (13 loc) • 536 B
TypeScript
import { AxiosResponse } from "axios";
interface IClashOfClansAPIConfig {
token: string;
endpoint?: string;
}
export default class ClashOfClansAPI implements IClashOfClansAPI {
readonly token: string | undefined;
readonly endpoint: string | undefined;
constructor(config: IClashOfClansAPIConfig);
get<TParams, TResponse>(path: string, params?: TParams): Promise<AxiosResponse<TResponse>>;
post<TParams, TResponse>(path: string, params?: TParams): Promise<AxiosResponse<TResponse>>;
}
export {};