From 6bcfbd1a29015b318e86c435a11cab9607560125 Mon Sep 17 00:00:00 2001 From: Avi Goldman Date: Mon, 9 Jan 2017 13:09:59 -0500 Subject: [PATCH] removed example-options.json --- .gitignore | 1 - composer.json | 2 -- examples/bootstrap.php | 4 ---- examples/message-events/get_message_events.php | 5 +---- examples/templates/create_template.php | 5 +---- examples/templates/delete_template.php | 5 +---- examples/templates/get_all_templates.php | 5 +---- examples/templates/get_template.php | 5 +---- examples/templates/preview_template.php | 5 +---- examples/templates/update_template.php | 5 +---- examples/transmissions/create_transmission.php | 5 +---- .../transmissions/create_transmission_with_attachment.php | 5 +---- .../transmissions/create_transmission_with_cc_and_bcc.php | 5 +---- .../create_transmission_with_recipient_list.php | 5 +---- examples/transmissions/create_transmission_with_template.php | 5 +---- examples/transmissions/delete_transmission.php | 5 +---- examples/transmissions/get_all_transmissions.php | 5 +---- examples/transmissions/get_transmission.php | 5 +---- post-install.sh | 3 --- 19 files changed, 15 insertions(+), 70 deletions(-) delete mode 100755 post-install.sh diff --git a/.gitignore b/.gitignore index c295055..a043779 100644 --- a/.gitignore +++ b/.gitignore @@ -3,7 +3,6 @@ .settings .buildpath test/output/ -examples/example-options.json .idea /composer.phar test.php diff --git a/composer.json b/composer.json index 24f6f10..20ee16d 100644 --- a/composer.json +++ b/composer.json @@ -9,8 +9,6 @@ ], "minimum-stability": "stable", "scripts": { - "post-install-cmd": "./post-install.sh", - "post-update-cmd": "./post-install.sh", "test": "./vendor/bin/phpunit", "fix-style": "php-cs-fixer fix ." }, diff --git a/examples/bootstrap.php b/examples/bootstrap.php index 1110ed3..688d53e 100644 --- a/examples/bootstrap.php +++ b/examples/bootstrap.php @@ -1,7 +1,3 @@ "YOUR_API_KEY",]); $promise = $sparky->request('GET', 'message-events', [ 'campaign_ids' => 'CAMPAIGN_ID', 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 @@ $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 @@ $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 @@ $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 @@ $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 @@ $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 @@ $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' => [ diff --git a/examples/transmissions/create_transmission.php b/examples/transmissions/create_transmission.php index a7a1914..a46edd2 100644 --- a/examples/transmissions/create_transmission.php +++ b/examples/transmissions/create_transmission.php @@ -10,10 +10,7 @@ $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->transmissions->post([ 'content' => [ diff --git a/examples/transmissions/create_transmission_with_attachment.php b/examples/transmissions/create_transmission_with_attachment.php index 4186806..74c1822 100644 --- a/examples/transmissions/create_transmission_with_attachment.php +++ b/examples/transmissions/create_transmission_with_attachment.php @@ -10,10 +10,7 @@ $httpClient = new GuzzleAdapter(new Client()); -/* - * configure options in example-options.json - */ -$sparky = new SparkPost($httpClient, $options); +$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]); $filePath = dirname(__FILE__).'/'; $fileName = 'sparkpost.png'; diff --git a/examples/transmissions/create_transmission_with_cc_and_bcc.php b/examples/transmissions/create_transmission_with_cc_and_bcc.php index 5e1bf23..de65b29 100644 --- a/examples/transmissions/create_transmission_with_cc_and_bcc.php +++ b/examples/transmissions/create_transmission_with_cc_and_bcc.php @@ -10,10 +10,7 @@ $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->transmissions->post([ 'content' => [ diff --git a/examples/transmissions/create_transmission_with_recipient_list.php b/examples/transmissions/create_transmission_with_recipient_list.php index e658b0d..b8fa75f 100644 --- a/examples/transmissions/create_transmission_with_recipient_list.php +++ b/examples/transmissions/create_transmission_with_recipient_list.php @@ -10,10 +10,7 @@ $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->transmissions->post([ 'content' => [ diff --git a/examples/transmissions/create_transmission_with_template.php b/examples/transmissions/create_transmission_with_template.php index e8f3fb6..7bb9020 100644 --- a/examples/transmissions/create_transmission_with_template.php +++ b/examples/transmissions/create_transmission_with_template.php @@ -10,10 +10,7 @@ $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->transmissions->post([ 'content' => ['template_id' => 'TEMPLATE_ID'], diff --git a/examples/transmissions/delete_transmission.php b/examples/transmissions/delete_transmission.php index ad0cc64..f62766c 100644 --- a/examples/transmissions/delete_transmission.php +++ b/examples/transmissions/delete_transmission.php @@ -10,10 +10,7 @@ $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->transmissions->delete('TRANSMISSION_ID'); diff --git a/examples/transmissions/get_all_transmissions.php b/examples/transmissions/get_all_transmissions.php index 0b4eb7f..37646ba 100644 --- a/examples/transmissions/get_all_transmissions.php +++ b/examples/transmissions/get_all_transmissions.php @@ -10,10 +10,7 @@ $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->transmissions->get(); diff --git a/examples/transmissions/get_transmission.php b/examples/transmissions/get_transmission.php index b149107..f62078f 100644 --- a/examples/transmissions/get_transmission.php +++ b/examples/transmissions/get_transmission.php @@ -10,10 +10,7 @@ $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->transmissions->get('TRANSMISSION_ID'); diff --git a/post-install.sh b/post-install.sh deleted file mode 100755 index 0326a42..0000000 --- a/post-install.sh +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/bash - -if [ ! -f 'examples/example-options.json' ]; then echo '{\n\t"key":"YOUR_API_KEY"\n}' >> examples/example-options.json; fi