account.get
Get information (e.g. api calls left, limitations, expiration date etc) about your API Account.
Request Parameters
(none)Response Parameters
| account_id | int |
The id of your API account.
| expiration_date | String |
Date when the subscription for this account expires.
| left_month (api_calls) | int |
API calls left for this account until the monthly reset date.
Wrapped in an "api_calls" object.| left_hour (api_calls) | int |
API calls left for this account until the hourly reset date.
Wrapped in an "api_calls" object.| limit_month (api_calls) | int |
Monthly API calls limit
Wrapped in an "api_calls" object.| limit_hour (api_calls) | int |
Hourly API calls limit
Wrapped in an "api_calls" object.| reset_month (api_calls) | String |
Date when montly API calls will be reset
Wrapped in an "api_calls" object.| reset_hour (api_calls) | String |
Date when hourly API calls will be reset
Wrapped in an "api_calls" object.| limit (collections) | int |
Maximum number of collections allowed.
Wrapped in a "collections" object.| left (collections) | int |
Collections left to be used.
Wrapped in a "collections" object.| limit (groups) | int |
Maximum number of groups allowed.
Wrapped in a "groups" object.| max (groups) | int |
Groups left to be used.
Wrapped in a "groups" object.| left_batch (api_calls) | int |
Batch calls left.
Batch calls is used when your monthly calls has run out.Code Examples
JSON
{"method":"account.get","params":{}, "id":0}
{
"id":0,
"result":{
"api_calls":{
"left_month":1246,
"left_hour":232,
"reset_hour":"2011-05-18T15:02:32Z",
"limit_month":2000,
"limit_hour":240,
"reset_month":"2011-06-16T15:39:20Z",
"left_batch":1000
},
"account_id":1,
"expiration_date":"2011-05-18T15:02:32Z",
"collections":{
"limit":5,
"left":3
},
"groups":{
"limit":10,
"left":5
}
}
}
Java
// You need to have a ready-to-use client to use the other methods
SaploClient client = new SaploClient("YOUR_API_KEY", "YOUR_SECRET_KEY");
// Create a SaploAccountManager to work with accounts
SaploAccountManager accountMgr = new SaploAccountManager(client);
// Get your account from the API
SaploAccount myAccount = accountMgr.get();
// Print it out
System.out.println(myAccount.toString());
PHP
$client = new SaploAPI("YOUR API KEY", "YOUR SECRET KEY");
try {
$result = $client->account->get();
} catch(SaploException $e) {
echo '(' . $e->getCode() . ') ' . $e->getMessage();
}
var_dump($result);
Python
client = SaploJSONClient("YOUR API KEY", "YOUR SECRET KEY")
account = client.account.get()
print "This is your account:", account
Matlab
response = saploRequest('account.get')