diff options
author | Avi Goldman <avrahamymgoldman@gmail.com> | 2017-01-09 13:09:59 -0500 |
---|---|---|
committer | Avi Goldman <avrahamymgoldman@gmail.com> | 2017-01-09 13:09:59 -0500 |
commit | 6bcfbd1a29015b318e86c435a11cab9607560125 (patch) | |
tree | e01220fe29b9cf8cc151f9cc8785496f8fa2cd33 | |
parent | 87ee8c01940d948f43c5d84e8de5fd03cf7864ec (diff) | |
download | php-sparkpost-6bcfbd1a29015b318e86c435a11cab9607560125.zip php-sparkpost-6bcfbd1a29015b318e86c435a11cab9607560125.tar.gz php-sparkpost-6bcfbd1a29015b318e86c435a11cab9607560125.tar.bz2 |
removed example-options.json
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | composer.json | 2 | ||||
-rw-r--r-- | examples/bootstrap.php | 4 | ||||
-rw-r--r-- | examples/message-events/get_message_events.php | 5 | ||||
-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 | ||||
-rw-r--r-- | examples/transmissions/create_transmission.php | 5 | ||||
-rw-r--r-- | examples/transmissions/create_transmission_with_attachment.php | 5 | ||||
-rw-r--r-- | examples/transmissions/create_transmission_with_cc_and_bcc.php | 5 | ||||
-rw-r--r-- | examples/transmissions/create_transmission_with_recipient_list.php | 5 | ||||
-rw-r--r-- | examples/transmissions/create_transmission_with_template.php | 5 | ||||
-rw-r--r-- | examples/transmissions/delete_transmission.php | 5 | ||||
-rw-r--r-- | examples/transmissions/get_all_transmissions.php | 5 | ||||
-rw-r--r-- | examples/transmissions/get_transmission.php | 5 | ||||
-rwxr-xr-x | post-install.sh | 3 |
19 files changed, 15 insertions, 70 deletions
@@ -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 @@ <?php require_once dirname(__FILE__).'/../vendor/autoload.php'; - -//pull in library options -$optionsFile = file_get_contents(dirname(__FILE__).'/example-options.json'); -$options = json_decode($optionsFile, true); diff --git a/examples/message-events/get_message_events.php b/examples/message-events/get_message_events.php index e027df1..0a3c4ac 100644 --- a/examples/message-events/get_message_events.php +++ b/examples/message-events/get_message_events.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', '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 @@ 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' => [ 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 @@ 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->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 @@ 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"]); $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 @@ 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->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 @@ 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->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 @@ 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->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 @@ 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->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 @@ 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->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 @@ 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->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 |