krapio
Library referenceClasses

PlayerApi

GET /api/player/*: profile, inventory, listings, ranked matches and posts of a player

Constructors

Constructor

new PlayerApi(client): PlayerApi;

Parameters

ParameterType
clientKrunkerClient

Returns

PlayerApi

Methods

inventory()

inventory(playerName): Promise<InventoryItem[]>;

GET /api/player/:playername/inventory

Parameters

ParameterType
playerNamestring

Returns

Promise<InventoryItem[]>


listings()

listings(playerName, query?): Promise<PlayerListings>;

GET /api/player/:playername/listings, 10 per page, newest first

Parameters

ParameterType
playerNamestring
query?Page

Returns

Promise<PlayerListings>


matches()

matches(playerName, query?): Promise<PlayerMatches>;

GET /api/player/:playername/matches, ranked only, 10 per page, newest first

Parameters

ParameterType
playerNamestring
query?MatchesQuery

Returns

Promise<PlayerMatches>


posts()

posts(playerName, query?): Promise<PlayerPosts>;

GET /api/player/:playername/posts, 10 per page

Parameters

ParameterType
playerNamestring
query?Page

Returns

Promise<PlayerPosts>


profile()

profile(playerName): Promise<PlayerProfile>;

GET /api/player/:playername

Parameters

ParameterType
playerNamestring

Returns

Promise<PlayerProfile>

On this page