summaryrefslogtreecommitdiffstats
path: root/examples/transmission/get_all_transmissions.php
diff options
context:
space:
mode:
authorbeardyman <nornholdj@gmail.com>2015-09-15 20:43:30 -0400
committerbeardyman <nornholdj@gmail.com>2015-09-15 20:43:30 -0400
commitc0b9e8b6cb7b1d616941b657958126b551b22eef (patch)
tree98829e5b048cf9328f6211719f7e87886472dbe4 /examples/transmission/get_all_transmissions.php
parentaeea514f81c652257b64e606c771cc51249db49c (diff)
downloadphp-sparkpost-c0b9e8b6cb7b1d616941b657958126b551b22eef.zip
php-sparkpost-c0b9e8b6cb7b1d616941b657958126b551b22eef.tar.gz
php-sparkpost-c0b9e8b6cb7b1d616941b657958126b551b22eef.tar.bz2
Refactored to use http adapter instead of guzzle directly
Diffstat (limited to 'examples/transmission/get_all_transmissions.php')
-rw-r--r--examples/transmission/get_all_transmissions.php11
1 files changed, 8 insertions, 3 deletions
diff --git a/examples/transmission/get_all_transmissions.php b/examples/transmission/get_all_transmissions.php
index db06b68..2005a75 100644
--- a/examples/transmission/get_all_transmissions.php
+++ b/examples/transmission/get_all_transmissions.php
@@ -4,14 +4,19 @@ require_once (dirname(__FILE__).'/../bootstrap.php');
use SparkPost\SparkPost;
use SparkPost\Transmission;
+use GuzzleHttp\Client;
+use Ivory\HttpAdapter\Guzzle6HttpAdapter;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+$key = 'YOURAPIKEY';
+$httpAdapter = new Guzzle6HttpAdapter(new Client());
+SparkPost::setConfig($httpAdapter, ['key'=>$key]);
try {
$results = Transmission::all();
+ echo "it returned!!!";
+ var_dump($results);
echo 'Congrats you can use your SDK!';
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>