playfab_ex v0.2.2 PlayfabEx.Client.Default.Trading

Link to this section Summary

Functions

Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted items will be swapped between the two players’ inventories

Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other players from accepting them, for trades that can be claimed by more than one player)

Gets all trades the player has either opened or accepted, optionally filtered by trade status

Gets the current status of an existing trade

Opens a new outstanding trade. Note that a given item instance may only be in one open trade at a time

Link to this section Functions

Link to this function accept_trade(params)
accept_trade(map()) :: {:ok, map()} | {:error, String.t()}

Accepts an open trade (one that has not yet been accepted or cancelled), if the locally signed-in player is in the allowed player list for the trade, or it is open to all players. If the call is successful, the offered and accepted items will be swapped between the two players’ inventories.

@link https://api.playfab.com/documentation/client/method/AcceptTrade

Link to this function cancel_trade(params)
cancel_trade(map()) :: {:ok, map()} | {:error, String.t()}

Cancels an open trade (one that has not yet been accepted or cancelled). Note that only the player who created the trade can cancel it via this API call, to prevent griefing of the trade system (cancelling trades in order to prevent other players from accepting them, for trades that can be claimed by more than one player).

@link https://api.playfab.com/documentation/client/method/CancelTrade

Link to this function get_player_trades(params)
get_player_trades(map()) :: {:ok, map()} | {:error, String.t()}

Gets all trades the player has either opened or accepted, optionally filtered by trade status.

@link https://api.playfab.com/documentation/client/method/GetPlayerTrades

Link to this function get_trade_status(params)
get_trade_status(map()) :: {:ok, map()} | {:error, String.t()}

Gets the current status of an existing trade.

@link https://api.playfab.com/documentation/client/method/GetTradeStatus

Link to this function open_trade(params)
open_trade(map()) :: {:ok, map()} | {:error, String.t()}

Opens a new outstanding trade. Note that a given item instance may only be in one open trade at a time.

@link https://api.playfab.com/documentation/client/method/OpenTrade