SEconomy
SEconomy
API Keys
The SEconomy class gives us the ability to transfer silver or issue silver rewards from Sinespace's vault. Therefore, for the below methods to work, you will need to first set the AcessKey which is an API Key given by Sinespace.
To request an API Key, please submit a support ticket.
Here's two API Keys which are pre-generated and available to the public:
b9184836-9c73-486a-b058-a0a668b860f7 Maximum 5000 silver per 24 hours per user, AND allows up to 5000 to be deducted as well. Works only on Preview.
11f55b74-69ee-4dd3-8983-17c466912beb Maximum 500 silver per 24 hours per user. Works on Preview or Live.
Note: The above two keys work with DeductSilver() and AddSilver(). You'll need an API Key which has your specific required function enabled.
Index
Functions Index
Properties Index
string AccessKey set
Functions
DeductSilver
void DeductSilver (int amount, Action< bool > onFinished=null) void DeductSilver (int amount, Closure onFinished=null)
Deducts amount of silver from player's silver balance. You can also bind a function which will be called when operation is finished (optional), which also returns a Boolean if the operation succeeded or not (for example, API Key limit reached). This method requires AccessKey to be set first.
AddSilver
void AddSilver (int amount, Action< bool > onFinished=null) void AddSilver (int amount, Closure onFinished=null)
Adds amount of silver to player's silver balance. You can also bind a function which will be called when operation is finished (optional), which also returns a Boolean if the operation succeeded or not (for example, API Key limit reached). The source of the silver is Sinespace. This method requires AccessKey to be set first.
TransferSilverFrom
void TransferSilverFrom (int amount, string reason, int to, Action< bool > onFinished=null) void TransferSilverFrom (int amount, string reason, int to, Closure onFinished=null)
Removes 'amount' of silver from player avatar's balance and sends it to 'to' avatar ID. You can also bind a function which will be called when operation is finished (optional), which also returns a Boolean if the operation succeeded or not (for example, API Key limit reached). This method requires AccessKey to be set first.
Properties
PropertyName
string AccessKey set
This API Key needs to be set before any of the SEconomy functions will work.
Last updated