fortnite-replay-info
Version:
Official Replay Info API JS Wrapper
114 lines (113 loc) • 4.52 kB
TypeScript
/// <reference types="node" />
import { Versions } from './types/versions.types';
import { Cosmetics } from './types/cosmetics.types';
import { LandingSpots } from './types/landingspots.types';
import { Stats } from './types/stats.types';
import { Matches } from './types/matches.types';
import { Tournaments } from './types/tournaments.types';
import { SafeZones } from './types/safezones.types';
import { CurrentFunding } from './types/current.fundings.types';
import { FundingInfo } from './types/info.fundings.types';
import { FundingValues } from './types/values.fundings.types';
export declare class Client {
private readonly _apiKey;
constructor(apiKey: string);
/**
* Get the versions the API has data of
* @param page Get a specific page
* @returns {Promise<Versions>} Object with the versions
*/
getVersions(page?: number): Promise<Versions>;
/**
* Get Cosmetic Stats
* @param type Type of the cosmetics to get
* @param page Specific page of the cosmetics to get
*/
getLifetimeCosmetics(type?: string, page?: number): Promise<Cosmetics>;
/**
* Get Cosmetic Stats
* @param type Type of the cosmetics to get
* @param page Specific page of the cosmetics to get
*/
getCurrentCosmetics(type?: string, page?: number): Promise<Cosmetics>;
/**
* Get Cosmetic Stats
* @param version Version of the cosmetics to get
* @param type Type of the cosmetics to get
* @param page Specific page of the cosmetics to get
*/
getVersionCosmetics(version: string, type?: string, page?: number): Promise<Cosmetics>;
/**
* Get the landing spots
* @param version Version of the cosmetics to get
* @param page Specific page of the cosmetics to get
* @returns {Promise<LandingSpots>} Object with the landing spots
*/
getLandingSpots(version: string, page?: number): Promise<LandingSpots>;
/**
* Get Matches of a given player
* @param player Username of the player to get matches from
* @param version Optionnal version option
* @param page Optionnal page option
* @returns {Object}
*/
getMatches(player: string, version: string, page?: number): Promise<Matches>;
/**
* Get Stats of a given player
* @param player Username of the player to get stats from
* @param version Optionnal version option
* @param page Optionnal page option
* @returns {Object}
*/
getStats(player: string, version: string, page?: number): Promise<Stats>;
/**
* Get Tournaments of a given player
* @param player Username of the player to get tournaments from
* @param version Optionnal version option
* @param page Optionnal page option
* @returns {Object}
*/
getTournaments(player: string, version: string, page?: number): Promise<Tournaments>;
/***
* Get Lifetime Safezones
* @param page Optionnal page option
*/
getLifetimeSafezones(page?: number): Promise<SafeZones>;
/***
* Get Version Safezones
* @param version Version option
* @param page Optionnal page option
*/
getVersionSafezones(version: string, page?: number): Promise<SafeZones>;
/**
* Get Current Funding
* @returns Current Fundings Object
*/
getCurrentFunding(): Promise<CurrentFunding>;
/**
* Get Current Fundings Info
* @returns Current fundings info
*/
getFundingsInfo(): Promise<FundingInfo>;
/**
* Get All Values of the funding (Useful for Graphs)
* @param index Index of the funding, can be found in info
* @returns Funding Values for each match parsed
*/
getFundingsValues(index: number): Promise<FundingValues>;
/**
* Ever wanted to get a use ranking of cosmetics you choose? Ever wanted to make it your own custom design? Ever wanted to look for your favorite cosmetic?
* We've got you covered, make your own, or watch now!
* @param cosmetics Cosmeyic names or ids you want to get data from
* @param period Period to get the stats from
* @param options Additional options
* @returns Image
*/
getRankingImage(cosmetics: string[], period: "lifetime" | "season" | "version", options: {
bg?: string;
season?: string;
version?: string;
textcolor?: string;
blockcolor?: string;
}): Promise<Buffer>;
}