stats_list
The stats_list method retrieves a list of available stats periods for use with the stats_snapshot method.
Syntax
{
<credentials object>
}
Response fields for stats_list
The following fields may be returned in response to the stats_list method:
Field name | Obligation | Description/Value |
---|---|---|
error | Returned if success = false | A text string that explains the error. |
error_number | Returned if success = false | A number that represents the error. |
snapshots | Returned if success = true | The list of snapshot periods. Allowed values are: month—List of monthy snapshots, in the format YYYY-MM. week—List of weekly snapshots, in the format YYYYMMDD-YYYYMMDD. * day—List of daily snapshots, in the format, YYYYMMDD. |
success | Always returned | Indicates whether the request was successful or not. Allowed values are true and false. |
Examples for stats_list
Request
{
"credentials": {
"user": "[email protected]",
"password": "sw0rdf1sh"
},
}
Response
{
"success": true,
"snapshots": {
"month": [
"2011-01",
"2011-02",
"2011-03",
"2011-04",
"2011-05",
"2011-06"
],
"week": [
"20110103-20110109",
"20110110-20110116",
"20110117-20110123",
"20110124-20110130",
"20110131-20110206",
"20110207-20110213",
"20110214-20110220",
"20110221-20110227",
...
"20110620-20110626",
"20110627-20110703",
],
"day": [
"20110111",
"20110107",
"20110112",
"20100314",
"20110113",
"20110114",
"20110115",
...
"20110629",
"20110630",
]
}
}
Updated less than a minute ago