Skip to content

Commit 6bcfbd1

Browse files
committed
removed example-options.json
1 parent 87ee8c0 commit 6bcfbd1

19 files changed

+15
-70
lines changed

.gitignore

-1
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
.settings
44
.buildpath
55
test/output/
6-
examples/example-options.json
76
.idea
87
/composer.phar
98
test.php

composer.json

-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,6 @@
99
],
1010
"minimum-stability": "stable",
1111
"scripts": {
12-
"post-install-cmd": "./post-install.sh",
13-
"post-update-cmd": "./post-install.sh",
1412
"test": "./vendor/bin/phpunit",
1513
"fix-style": "php-cs-fixer fix ."
1614
},

examples/bootstrap.php

-4
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,3 @@
11
<?php
22

33
require_once dirname(__FILE__).'/../vendor/autoload.php';
4-
5-
//pull in library options
6-
$optionsFile = file_get_contents(dirname(__FILE__).'/example-options.json');
7-
$options = json_decode($optionsFile, true);

examples/message-events/get_message_events.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY",]);
1714

1815
$promise = $sparky->request('GET', 'message-events', [
1916
'campaign_ids' => 'CAMPAIGN_ID',

examples/templates/create_template.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->request('POST', 'templates', [
1916
'name' => 'PHP example template',

examples/templates/delete_template.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->request('DELETE', 'templates/TEMPLATE_ID');
1916

examples/templates/get_all_templates.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->request('GET', 'templates');
1916

examples/templates/get_template.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->request('GET', 'templates/TEMPLATE_ID?draft=true');
1916

examples/templates/preview_template.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->request('POST', 'templates/TEMPLATE_ID/preview?draft=true', [
1916
'substitution_data' => [

examples/templates/update_template.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->request('PUT', 'templates/TEMPLATE_ID', [
1916
'options' => [

examples/transmissions/create_transmission.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->transmissions->post([
1916
'content' => [

examples/transmissions/create_transmission_with_attachment.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$filePath = dirname(__FILE__).'/';
1916
$fileName = 'sparkpost.png';

examples/transmissions/create_transmission_with_cc_and_bcc.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->transmissions->post([
1916
'content' => [

examples/transmissions/create_transmission_with_recipient_list.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->transmissions->post([
1916
'content' => [

examples/transmissions/create_transmission_with_template.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->transmissions->post([
1916
'content' => ['template_id' => 'TEMPLATE_ID'],

examples/transmissions/delete_transmission.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->transmissions->delete('TRANSMISSION_ID');
1916

examples/transmissions/get_all_transmissions.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->transmissions->get();
1916

examples/transmissions/get_transmission.php

+1-4
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,7 @@
1010

1111
$httpClient = new GuzzleAdapter(new Client());
1212

13-
/*
14-
* configure options in example-options.json
15-
*/
16-
$sparky = new SparkPost($httpClient, $options);
13+
$sparky = new SparkPost($httpClient, ["key" => "YOUR_API_KEY"]);
1714

1815
$promise = $sparky->transmissions->get('TRANSMISSION_ID');
1916

post-install.sh

-3
This file was deleted.

0 commit comments

Comments
 (0)