Library referenceClasses
PlayerApi
GET /api/player/*: profile, inventory, listings, ranked matches and posts of a player
Constructors
Constructor
new PlayerApi(client): PlayerApi;Parameters
| Parameter | Type |
|---|---|
client | KrunkerClient |
Returns
PlayerApi
Methods
inventory()
inventory(playerName): Promise<InventoryItem[]>;GET /api/player/:playername/inventory
Parameters
| Parameter | Type |
|---|---|
playerName | string |
Returns
Promise<InventoryItem[]>
listings()
listings(playerName, query?): Promise<PlayerListings>;GET /api/player/:playername/listings, 10 per page, newest first
Parameters
| Parameter | Type |
|---|---|
playerName | string |
query? | Page |
Returns
Promise<PlayerListings>
matches()
matches(playerName, query?): Promise<PlayerMatches>;GET /api/player/:playername/matches, ranked only, 10 per page, newest first
Parameters
| Parameter | Type |
|---|---|
playerName | string |
query? | MatchesQuery |
Returns
Promise<PlayerMatches>
posts()
posts(playerName, query?): Promise<PlayerPosts>;GET /api/player/:playername/posts, 10 per page
Parameters
| Parameter | Type |
|---|---|
playerName | string |
query? | Page |
Returns
Promise<PlayerPosts>
profile()
profile(playerName): Promise<PlayerProfile>;GET /api/player/:playername
Parameters
| Parameter | Type |
|---|---|
playerName | string |
Returns
Promise<PlayerProfile>