![]() |
CotC C# SDK for Unity
v1.4.0.1
Making social games is easy !
|
Class allowing to manipulate the transactions and perform tasks related to achievements. This class is scoped by domain, meaning that you can call .Domain("yourdomain") and perform additional calls that are scoped.
Public Member Functions | |
Promise< Bundle > | Balance () |
Retrieves the balance of the user. That is, the amount of "items" remaining after the various executed transactions. More... | |
GamerTransactions | Domain (string domain) |
Changes the domain affected by the next operations. You should typically use it this way: gamer.Transactions.Domain("private").Post(...); More... | |
Promise< PagedList< Transaction > > | History (string unit=null, int limit=30, int offset=0) |
Fetches the history of transactions run for this user. The current balance (resulting values) needs to be queried via a different call (Balance). More... | |
Promise< TransactionResult > | Post (Bundle transaction, string description=null) |
Executes a transaction on the behalf of the user. More... | |
Retrieves the balance of the user. That is, the amount of "items" remaining after the various executed transactions.
result.Value["gold"]
for instance.GamerTransactions CotcSdk.GamerTransactions.Domain | ( | string | domain | ) |
Changes the domain affected by the next operations. You should typically use it this way: gamer.Transactions.Domain("private").Post(...);
domain | Domain on which to scope the transactions. Default to private if unmodified. |
Promise<PagedList<Transaction> > CotcSdk.GamerTransactions.History | ( | string | unit = null , |
int | limit = 30 , |
||
int | offset = 0 |
||
) |
Fetches the history of transactions run for this user. The current balance (resulting values) needs to be queried via a different call (Balance).
unit | If specified, retrieves only the transactions matching a given unit (e.g. "gold"). |
limit | For pagination, allows to set a greater or smaller page size than the default 30. |
offset | For pagination, avoid using it explicitly. |
Promise<TransactionResult> CotcSdk.GamerTransactions.Post | ( | Bundle | transaction, |
string | description = null |
||
) |
Executes a transaction on the behalf of the user.
transaction | Transaction to run. Consists of keys and associated integer values. A negative value indicates that the associated balance should be decremented. The special value "-auto" resets the value to zero. |
description | Description of the transaction. Will appear in the back office. |