Library referenceClasses
TokenTradesApi
player to player trades; creating, accepting and cancelling are writes and stay out
Constructors
Constructor
new TokenTradesApi(gapi, auth): TokenTradesApi;Parameters
| Parameter | Type |
|---|---|
gapi | KrunkerClient |
auth | Record<string, string> |
Returns
TokenTradesApi
Methods
history()
history(query?): Promise<TradeHistory>;GET /trades/history, open and completed trades of the player
Parameters
| Parameter | Type |
|---|---|
query? | TradeHistoryQuery |
Returns
Promise<TradeHistory>
inventory()
inventory(playerId): Promise<TradeInventories>;GET /trades/inventory/:playerId, both inventories side by side
Parameters
| Parameter | Type |
|---|---|
playerId | number |
Returns
Promise<TradeInventories>
playerSearch()
playerSearch(playerName): Promise<TradePlayer>;GET /trades/player-search, one player by exact name
Parameters
| Parameter | Type |
|---|---|
playerName | string |
Returns
Promise<TradePlayer>