Subversion Repositories cheapmusic

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
103 - 1
<?php
2
// If you are using Composer
3
require 'vendor/autoload.php';
4
 
5
 
6
$apiKey = getenv('SENDGRID_API_KEY');
7
$sg = new \SendGrid($apiKey);
8
 
9
////////////////////////////////////////////////////
10
// Retrieve email statistics by mailbox provider. #
11
// GET /mailbox_providers/stats #
12
 
13
$query_params = json_decode('{"end_date": "2016-04-01", "mailbox_providers": "test_string", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01"}');
14
$response = $sg->client->mailbox_providers()->stats()->get(null, $query_params);
15
echo $response->statusCode();
16
echo $response->body();
17
echo $response->headers();