|
Climaps API
version 1
|
Static Public Member Functions | |
| static | getOwnCredits () |
| static | getOwnTransactions () |
| static | getTransactionTypes () |
Static Public Attributes | |
| static | TRANSACTION_TYPE_ALL = 0 |
| All type of transaction. | |
| static | TRANSACTION_TYPE_PURCHASE = 1 |
| Credits purchased by contacting Sensorscope Sàrl. | |
| static | TRANSACTION_TYPE_TRANSFER = 2 |
| Credits transferred to/from another user. | |
| static | TRANSACTION_TYPE_ALERT_SMS = 3 |
| Credits spent by sending an SMS alert. | |
| static | TRANSACTION_TYPE_ALERT_VOICE = 4 |
| Credits spent by sending a voice alert. | |
| static | TRANSACTION_TYPE_ONLINE_PURCHASE = 5 |
| Credits purchased directly on climaps.com. | |
This class lets you access credits information of the user account the API key is tied to. Climaps credits are used for various purposes such as sending SMS or voice alerts.
|
static |
Get balance information for the current user.
An object such as:
| Property | Type | Description |
|---|---|---|
| credits | int | Number of credits left |
| creditsmin | int | Minimum number of credits allowed (generally 0, but can be negative as well) |
|
static |
Get a list of the current user's credits transactions.
| int | type | The transaction type Id (e.g., credits::TRANSACTION_TYPE_ALL) |
| int | from | Begining of the time interval, in epoch time |
| int | to | End of the time interval, in epoch time |
An array of objects such as:
| Property | Type | Description |
|---|---|---|
| type | string | The transaction type id, see credits::getTransactionTypes |
| epoch | int | The date of the transaction, in epoch time |
| amount | int | An amount of credits |
| balance | int | The new account balance, after the transaction |
| details | string | Details of the transaction |
|
static |
Get the list of all possible credits transactions.
These transactions are the different ways of acquiring or spending Climaps credits (e.g., sending an SMS alert, purchasing credits).
An array of objects such as:
| Property | Type | Description |
|---|---|---|
| id | int | Id of the transaction type |
| description | string | Description of the transaction type |
1.8.8