diff options
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' => [ |