Retrieve the statistics of all the subscribers in the
database.
The following errors can occur:
- Token not present in request.
- Token not in the required format.
- Session does not exist.
- Session has expired.
- The user does not exist.
- No database specified.
- Database parameter not in correct format.
- You are not allowed to access this database.
You should call this function as followed:
- rest/v2/statistics/subscribers?token=TOKEN&database=DATABASE_ID&from=2014-01-31%2010:15&to=2015-01-31%2020:20
require_once 'Rest.php';
$username = 'my_username';
$password = 'my_password';
$database = '999';
$rest = new Rest($username, $password, $database);
$result = $rest->call('statistics/subscribers', [
'from' => '2014-01-31 10:15',
'to' => '2015-01-31 20:20'
], 'GET');
var_dump($result);
The following parameters this method can/should be called with:
key: from
values: String, any value that can be converted by php/strtotime, defaults to last month
what: The starting date it should look at.
key: to
values: String, any value that can be converted by php/strtotime
what: The ending date it should look at.
The following items:
- user/login For the TOKEN.
- user/database For the DATABASE_ID