summaryrefslogtreecommitdiffstats
path: root/examples/unwrapped/get_webhooks.php
diff options
context:
space:
mode:
Diffstat (limited to 'examples/unwrapped/get_webhooks.php')
-rw-r--r--examples/unwrapped/get_webhooks.php28
1 files changed, 0 insertions, 28 deletions
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";
-}