From 87ee8c01940d948f43c5d84e8de5fd03cf7864ec Mon Sep 17 00:00:00 2001 From: Avi Goldman Date: Sat, 7 Jan 2017 09:23:44 -0500 Subject: [PATCH 1/2] added attachment example --- .../create_transmission_with_attachment.php | 58 ++++++++++++++++++ examples/transmissions/sparkpost.png | Bin 0 -> 6953 bytes 2 files changed, 58 insertions(+) create mode 100644 examples/transmissions/create_transmission_with_attachment.php create mode 100644 examples/transmissions/sparkpost.png diff --git a/examples/transmissions/create_transmission_with_attachment.php b/examples/transmissions/create_transmission_with_attachment.php new file mode 100644 index 0000000..4186806 --- /dev/null +++ b/examples/transmissions/create_transmission_with_attachment.php @@ -0,0 +1,58 @@ +transmissions->post([ + 'content' => [ + 'from' => [ + 'name' => 'SparkPost Team', + 'email' => 'from@sparkpostbox.com', + ], + 'subject' => 'Mailing With Attachment From PHP', + 'html' => '

Congratulations, {{name}}!

You just sent an email with an attachment!

', + 'text' => 'Congratulations, {{name}}! You just sent an email with an attachment', + 'attachments' => [ + [ + 'name' => $fileName, + 'type' => $fileType, + 'data' => $fileData, + ], + ], + ], + 'substitution_data' => ['name' => 'YOUR_FIRST_NAME'], + 'recipients' => [ + [ + 'address' => [ + 'name' => 'YOUR_NAME', + 'email' => 'YOUR_EMAIL', + ], + ], + ], +]); + +try { + $response = $promise->wait(); + echo $response->getStatusCode()."\n"; + print_r($response->getBody())."\n"; +} catch (\Exception $e) { + echo $e->getCode()."\n"; + echo $e->getMessage()."\n"; +} diff --git a/examples/transmissions/sparkpost.png b/examples/transmissions/sparkpost.png new file mode 100644 index 0000000000000000000000000000000000000000..140a1460421e3ce6f0435775bc93b0d6e1e03090 GIT binary patch literal 6953 zcmX9@WmJ?+6kY`BZY5W`QMz5a7YXSG0V!dLMY>B`8kUxlE`bH4o0XCdX%tu*=@0pS zyfHJ++<5MtGw0kJsiCfbhy5HI007`ADavXB04T=~|3R4O5AU`f<)ViV)(1s>2mpXX z^6xINc&xeiL#qUo0 zO_`KY37zRT9%i%CoHvFI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x-3}<;3M*$dA9O#y@rdemuUHD3p@9$0v z5`73(9yuHHV$jDVqF!dNlDMu?I_~u;=N1*M3i1hDg1EJGEbH4B&%5$2NE{Tm@Y2s9 z9Q^E}esK2WpclDRO;pVjb?JinqFr~u5bajlt%(Ca^qlQ8j0uicUg7y%S#eVPYY>I2 z0`S}#4Y4B~f@4*SBs)>?vfiT%?NaapYsKujC7n0qxfsFKU%Dj(%gJ|(iSpaB8e-Gg zX`^F_?iWj1~Q5 zBlS0QDiUryG=4zjc&3{QPSux(Ylj8l-yk)okv zDn~6 Date: Mon, 9 Jan 2017 13:09:59 -0500 Subject: [PATCH 2/2] 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