ACIL FM
Dark
Refresh
Current DIR:
/home/mhhtmff/app/NH-HR/plugins/sendgrid/examples/categories
/
home
mhhtmff
app
NH-HR
plugins
sendgrid
examples
categories
Upload
Zip Selected
Delete Selected
Pilih semua
Nama
Ukuran
Permission
Aksi
categories.php
1.95 MB
chmod
View
DL
Edit
Rename
Delete
Edit file: /home/mhhtmff/app/NH-HR/plugins/sendgrid/examples/categories/categories.php
<?php // Next line will load dependencies to run this example // Please refer to the README how to use in your project require_once __DIR__ . '/../../sendgrid-php.php'; $apiKey = getenv('SENDGRID_API_KEY'); $sg = new \SendGrid($apiKey); //////////////////////////////////////////////////// // Retrieve all categories # // GET /categories # $query_params = json_decode('{"category": "test_string", "limit": 1, "offset": 1}'); try { $response = $sg->client->categories()->get(null, $query_params); print $response->statusCode() . "\n"; print_r($response->headers()); print $response->body() . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } //////////////////////////////////////////////////// // Retrieve Email Statistics for Categories # // GET /categories/stats # $query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "offset": 1, "start_date": "2016-01-01", "categories": "test_string"}'); try { $response = $sg->client->categories()->stats()->get(null, $query_params); print $response->statusCode() . "\n"; print_r($response->headers()); print $response->body() . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; } //////////////////////////////////////////////////// // Retrieve sums of email stats for each category [Needs: Stats object defined, has category ID?] # // GET /categories/stats/sums # $query_params = json_decode('{"end_date": "2016-04-01", "aggregated_by": "day", "limit": 1, "sort_by_metric": "test_string", "offset": 1, "start_date": "2016-01-01", "sort_by_direction": "asc"}'); try { $response = $sg->client->categories()->stats()->sums()->get(null, $query_params); print $response->statusCode() . "\n"; print_r($response->headers()); print $response->body() . "\n"; } catch (Exception $e) { echo 'Caught exception: ', $e->getMessage(), "\n"; }
Simpan
Batal
Isi Zip:
Unzip
Create
Buat Folder
Buat File
Terminal / Execute
Run
Chmod Bulk
All File
All Folder
All File dan Folder
Apply