diff options
author | beardyman <nornholdj@gmail.com> | 2015-09-15 20:43:30 -0400 |
---|---|---|
committer | beardyman <nornholdj@gmail.com> | 2015-09-15 20:43:30 -0400 |
commit | c0b9e8b6cb7b1d616941b657958126b551b22eef (patch) | |
tree | 98829e5b048cf9328f6211719f7e87886472dbe4 /examples/transmission/get_all_transmissions.php | |
parent | aeea514f81c652257b64e606c771cc51249db49c (diff) | |
download | php-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.php | 11 |
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 +?> |