Postmark\PostmarkClient::getOutboundClickLocationStatistics PHP Метод

getOutboundClickLocationStatistics() публичный Метод

Get information about part of the message (HTML or Text) tracked links were clicked from in messages sent using this Server, optionally filtering on message tag, and a to and from date.
public getOutboundClickLocationStatistics ( string $tag = NULL, string $fromdate = NULL, string $todate = NULL ) : Postmark\Models\DynamicResponseModel
$tag string Filter by tag.
$fromdate string must be of the format 'YYYY-MM-DD'
$todate string must be of the format 'YYYY-MM-DD'
Результат Postmark\Models\DynamicResponseModel
    function getOutboundClickLocationStatistics($tag = NULL, $fromdate = NULL, $todate = NULL)
    {
        $query = array();
        $query['tag'] = $tag;
        $query['fromdate'] = $fromdate;
        $query['todate'] = $todate;
        return new DynamicResponseModel($this->processRestRequest('GET', '/stats/outbound/clicks/location', $query));
    }

Usage Example

 function testClientCanGetClickLocationStatistics()
 {
     $tk = parent::$testKeys;
     $client = new PostmarkClient($tk->READ_LINK_TRACKING_TEST_SERVER_TOKEN, $tk->TEST_TIMEOUT);
     $stats = $client->getOutboundClickLocationStatistics();
     $this->assertNotNull($stats);
 }