diff options
author | Avi Goldman <avrahamymgoldman@gmail.com> | 2017-01-10 09:17:42 -0500 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-01-10 09:17:42 -0500 |
commit | 36afb9f3fe8e8fc5f261708c43378b510be64e5e (patch) | |
tree | e01220fe29b9cf8cc151f9cc8785496f8fa2cd33 /examples/templates | |
parent | f4cb5267c58cbd0b3a4bd06d22aca5c52c2ff765 (diff) | |
parent | 6bcfbd1a29015b318e86c435a11cab9607560125 (diff) | |
download | php-sparkpost-36afb9f3fe8e8fc5f261708c43378b510be64e5e.zip php-sparkpost-36afb9f3fe8e8fc5f261708c43378b510be64e5e.tar.gz php-sparkpost-36afb9f3fe8e8fc5f261708c43378b510be64e5e.tar.bz2 |
added attachment example
added attachment example
Diffstat (limited to 'examples/templates')
-rw-r--r-- | examples/templates/create_template.php | 5 | ||||
-rw-r--r-- | examples/templates/delete_template.php | 5 | ||||
-rw-r--r-- | examples/templates/get_all_templates.php | 5 | ||||
-rw-r--r-- | examples/templates/get_template.php | 5 | ||||
-rw-r--r-- | examples/templates/preview_template.php | 5 | ||||
-rw-r--r-- | examples/templates/update_template.php | 5 |
6 files changed, 6 insertions, 24 deletions
diff --git a/examples/templates/create_template.php b/examples/templates/create_template.php index 826b076..ada8ff1 100644 --- a/examples/templates/create_template.php +++ b/examples/templates/create_template.php @@ -10,10 +10,7 @@ use Http\Adapter\Guzzle6\Client as GuzzleAdapter; $httpClient = new GuzzleAdapter(new Client()); -/* - * configure options in example-options.json - */ -$sparky = new SparkPost($httpClient, $options); +$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]); $promise = $sparky->request('POST', 'templates', [ 'name' => 'PHP example template', diff --git a/examples/templates/delete_template.php b/examples/templates/delete_template.php index 0985c5f..906a308 100644 --- a/examples/templates/delete_template.php +++ b/examples/templates/delete_template.php @@ -10,10 +10,7 @@ use Http\Adapter\Guzzle6\Client as GuzzleAdapter; $httpClient = new GuzzleAdapter(new Client()); -/* - * configure options in example-options.json - */ -$sparky = new SparkPost($httpClient, $options); +$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]); $promise = $sparky->request('DELETE', 'templates/TEMPLATE_ID'); diff --git a/examples/templates/get_all_templates.php b/examples/templates/get_all_templates.php index 25e222c..289ccb8 100644 --- a/examples/templates/get_all_templates.php +++ b/examples/templates/get_all_templates.php @@ -10,10 +10,7 @@ use Http\Adapter\Guzzle6\Client as GuzzleAdapter; $httpClient = new GuzzleAdapter(new Client()); -/* - * configure options in example-options.json - */ -$sparky = new SparkPost($httpClient, $options); +$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]); $promise = $sparky->request('GET', 'templates'); diff --git a/examples/templates/get_template.php b/examples/templates/get_template.php index 9ae977e..1cd4d42 100644 --- a/examples/templates/get_template.php +++ b/examples/templates/get_template.php @@ -10,10 +10,7 @@ use Http\Adapter\Guzzle6\Client as GuzzleAdapter; $httpClient = new GuzzleAdapter(new Client()); -/* - * configure options in example-options.json - */ -$sparky = new SparkPost($httpClient, $options); +$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]); $promise = $sparky->request('GET', 'templates/TEMPLATE_ID?draft=true'); diff --git a/examples/templates/preview_template.php b/examples/templates/preview_template.php index 0f0a1db..60f38c1 100644 --- a/examples/templates/preview_template.php +++ b/examples/templates/preview_template.php @@ -10,10 +10,7 @@ use Http\Adapter\Guzzle6\Client as GuzzleAdapter; $httpClient = new GuzzleAdapter(new Client()); -/* - * configure options in example-options.json - */ -$sparky = new SparkPost($httpClient, $options); +$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]); $promise = $sparky->request('POST', 'templates/TEMPLATE_ID/preview?draft=true', [ 'substitution_data' => [ diff --git a/examples/templates/update_template.php b/examples/templates/update_template.php index 4da186c..bc6ed53 100644 --- a/examples/templates/update_template.php +++ b/examples/templates/update_template.php @@ -10,10 +10,7 @@ use Http\Adapter\Guzzle6\Client as GuzzleAdapter; $httpClient = new GuzzleAdapter(new Client()); -/* - * configure options in example-options.json - */ -$sparky = new SparkPost($httpClient, $options); +$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]); $promise = $sparky->request('PUT', 'templates/TEMPLATE_ID', [ 'options' => [ |