summaryrefslogtreecommitdiffstats
path: root/examples/unwrapped
diff options
context:
space:
mode:
authorAvi Goldman <avrahamymgoldman@gmail.com>2016-06-22 11:46:29 -0400
committerAvi Goldman <avrahamymgoldman@gmail.com>2016-06-22 11:46:29 -0400
commitb1687e3d55960ba1810bb84be72c6307a6c5a2f3 (patch)
tree39b95cf55523dceb2d4216998139b19c49fa8595 /examples/unwrapped
parent9cf58b85b7c771af97b5d95735c090551809db7f (diff)
downloadphp-sparkpost-b1687e3d55960ba1810bb84be72c6307a6c5a2f3.zip
php-sparkpost-b1687e3d55960ba1810bb84be72c6307a6c5a2f3.tar.gz
php-sparkpost-b1687e3d55960ba1810bb84be72c6307a6c5a2f3.tar.bz2
removed old tests
Diffstat (limited to 'examples/unwrapped')
-rw-r--r--examples/unwrapped/create_template.php35
-rw-r--r--examples/unwrapped/create_transmission.php46
-rw-r--r--examples/unwrapped/get_webhooks.php28
3 files changed, 0 insertions, 109 deletions
diff --git a/examples/unwrapped/create_template.php b/examples/unwrapped/create_template.php
deleted file mode 100644
index 89523f1..0000000
--- a/examples/unwrapped/create_template.php
+++ /dev/null
@@ -1,35 +0,0 @@
-<?php
-
-namespace Examples\Unwrapped;
-
-require_once dirname(__FILE__).'/../bootstrap.php';
-
-//pull in API key config
-$configFile = file_get_contents(dirname(__FILE__).'/../example-config.json');
-$config = json_decode($configFile, true);
-
-use SparkPost\SparkPost;
-use GuzzleHttp\Client;
-use Ivory\HttpAdapter\Guzzle6HttpAdapter;
-
-$httpAdapter = new Guzzle6HttpAdapter(new Client());
-$sparky = new SparkPost($httpAdapter, ['key' => $config['api-key']]);
-
-try {
- // define the endpoint
- $sparky->setupUnwrapped('templates');
-
- $templateConfig = [
- 'name' => 'Summer Sale!',
- 'id' => 'summer-sale',
- 'content' => [
- 'from' => 'from@sparkpostbox.com',
- 'subject' => 'Summer deals',
- 'html' => '<b>Check out these deals!</b>',
- ],
- ];
- $results = $sparky->templates->create($templateConfig);
- echo 'Congrats! You created a template using SparkPost!';
-} catch (\Exception $exception) {
- echo $exception->getMessage();
-}
diff --git a/examples/unwrapped/create_transmission.php b/examples/unwrapped/create_transmission.php
deleted file mode 100644
index d3a44c5..0000000
--- a/examples/unwrapped/create_transmission.php
+++ /dev/null
@@ -1,46 +0,0 @@
-<?php
-
-namespace Examples\Unwrapped;
-
-require_once dirname(__FILE__).'/../bootstrap.php';
-
-//pull in API key config
-$configFile = file_get_contents(dirname(__FILE__).'/../example-config.json');
-$config = json_decode($configFile, true);
-
-use SparkPost\SparkPost;
-use GuzzleHttp\Client;
-use Ivory\HttpAdapter\Guzzle6HttpAdapter;
-
-$httpAdapter = new Guzzle6HttpAdapter(new Client());
-$sparky = new SparkPost($httpAdapter, ['key' => $config['api-key']]);
-
-try {
- // define the endpoint
- $sparky->setupUnwrapped('transmissions');
-
- $message = [
- 'recipients' => [
- [
- 'address' => [
- 'email' => 'john.doe@example.com',
- ],
- ],
- ],
- 'content' => [
- 'from' => [
- 'name' => 'From Envelope',
- 'email' => 'from@sparkpostbox.com',
- ],
- 'html' => '<p>Hello World!</p>',
- 'text' => 'Hello World!',
- 'subject' => 'Example Email',
- ],
- ];
- $results = $sparky->transmissions->create($message);
- echo 'Congrats! You sent a message using SparkPost!';
-} catch (\Exception $exception) {
- echo $exception->getAPIMessage()."\n";
- echo $exception->getAPICode()."\n";
- echo $exception->getAPIDescription()."\n";
-}
diff --git a/examples/unwrapped/get_webhooks.php b/examples/unwrapped/get_webhooks.php
deleted file mode 100644
index 90f7a9c..0000000
--- a/examples/unwrapped/get_webhooks.php
+++ /dev/null
@@ -1,28 +0,0 @@
-<?php
-
-namespace Examples\Unwrapped;
-
-require_once dirname(__FILE__).'/../bootstrap.php';
-
-//pull in API key config
-$configFile = file_get_contents(dirname(__FILE__).'/../example-config.json');
-$config = json_decode($configFile, true);
-
-use SparkPost\SparkPost;
-use GuzzleHttp\Client;
-use Ivory\HttpAdapter\Guzzle6HttpAdapter;
-
-$httpAdapter = new Guzzle6HttpAdapter(new Client());
-$sparky = new SparkPost($httpAdapter, ['key' => $config['api-key']]);
-
-try {
- $sparky->setupUnwrapped('webhooks');
-
- $results = $sparky->webhooks->get();
-
- echo 'Congrats! You got a list of all your webhooks from SparkPost!';
-} catch (\Exception $exception) {
- echo $exception->getAPIMessage()."\n";
- echo $exception->getAPICode()."\n";
- echo $exception->getAPIDescription()."\n";
-}