summaryrefslogtreecommitdiffstats
path: root/examples/transmission/get_all_transmissions.php
diff options
context:
space:
mode:
Diffstat (limited to 'examples/transmission/get_all_transmissions.php')
-rw-r--r--examples/transmission/get_all_transmissions.php14
1 files changed, 8 insertions, 6 deletions
diff --git a/examples/transmission/get_all_transmissions.php b/examples/transmission/get_all_transmissions.php
index fb62ec7..afbe5aa 100644
--- a/examples/transmission/get_all_transmissions.php
+++ b/examples/transmission/get_all_transmissions.php
@@ -3,18 +3,20 @@ namespace Examples\Transmisson;
require_once (dirname(__FILE__).'/../bootstrap.php');
//pull in API key config
-$configFile = file_get_contents(dirname(__FILE__) . "/../example-config.json");
+$configFile = file_get_contents(dirname(__FILE__) . '/../example-config.json');
$config = json_decode($configFile, true);
use SparkPost\SparkPost;
-use SparkPost\Transmission;
+use GuzzleHttp\Client;
+use Ivory\HttpAdapter\Guzzle6HttpAdapter;
-SparkPost::setConfig(array('key'=>$config['api-key']));
+$httpAdapter = new Guzzle6HttpAdapter(new Client());
+$sparky = new SparkPost($httpAdapter, ['key'=>$config['api-key']]);
try {
- $results = Transmission::all();
- echo 'Congrats you can use your SDK!';
+ $results = $sparky->transmission->all();
+ echo 'Congrats you can use your SDK!';
} catch (\Exception $exception) {
- echo $exception->getMessage();
+ echo $exception->getMessage();
}
?>