summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJason Rhodes <jason.matthew.rhodes@gmail.com>2015-10-02 14:09:40 -0400
committerJason Rhodes <jason.matthew.rhodes@gmail.com>2015-10-02 14:09:40 -0400
commit7b129232cea79cca8cf4c5cf25c561871af7d2d4 (patch)
treeab386d8decaed95f7550662004afc27e1e53b55a
parent59819ca0741b0cc56160a9fc8817e018110abce8 (diff)
parent9532e9b5499995583ccf99719d77403b2b9e8345 (diff)
downloadphp-sparkpost-7b129232cea79cca8cf4c5cf25c561871af7d2d4.zip
php-sparkpost-7b129232cea79cca8cf4c5cf25c561871af7d2d4.tar.gz
php-sparkpost-7b129232cea79cca8cf4c5cf25c561871af7d2d4.tar.bz2
Merge pull request #23 from SparkPost/example-config
Example config
-rw-r--r--.gitignore1
-rw-r--r--README.md12
-rw-r--r--composer.json11
-rw-r--r--composer.lock297
-rw-r--r--examples/transmission/get_all_transmissions.php9
-rw-r--r--examples/transmission/get_transmission.php10
-rw-r--r--examples/transmission/rfc822.php10
-rw-r--r--examples/transmission/send_transmission_all_fields.php10
-rw-r--r--examples/transmission/simple_send.php11
-rw-r--r--examples/transmission/stored_recipients_inline_content.php10
-rw-r--r--examples/transmission/stored_template_send.php10
-rw-r--r--examples/unwrapped/create_template.php12
12 files changed, 246 insertions, 157 deletions
diff --git a/.gitignore b/.gitignore
index cd6b314..b15c4c1 100644
--- a/.gitignore
+++ b/.gitignore
@@ -3,3 +3,4 @@
.settings
.buildpath
test/output/
+examples/example-config.json
diff --git a/README.md b/README.md
index 4ab67de..810e7cf 100644
--- a/README.md
+++ b/README.md
@@ -13,7 +13,7 @@ The recommended way to install the SparkPost PHP SDK is through composer.
# Install Composer
curl -sS https://getcomposer.org/installer | php
```
-Next, run the Composer command to install the SparkPost PHP SDK:
+Next, run the Composer command to install the SparkPost PHP SDK:
```
composer require sparkpost/php-sparkpost
```
@@ -29,7 +29,7 @@ SparkPost::setConfig(["key"=>"YOUR API KEY"]);
try {
// Build your email and send it!
- Transmission::send(array('campaign'=>'first-mailing',
+ Transmission::send(array('campaign'=>'first-mailing',
'from'=>'you@your-company.com',
'subject'=>'First SDK Mailing',
'html'=>'<html><body><h1>Congratulations, {{name}}!</h1><p>You just sent your very first mailing!</p></body></html>',
@@ -93,13 +93,13 @@ try {
Run `composer install` inside the directory to install dependecies and development tools.
### Testing
-Once all the dependencies are installed, you can execute the unit tests using `vendor/bin/phpunit --bootstrap test/unit/bootstrap.php ./test/unit`.
-
-If you're interested in code coverage, you can add the `--coverage` flag for phpunit like so: ```phpunit --coverage-html test/output/report --bootstrap test/unit/bootstrap.php ./test/unit```
+Once all the dependencies are installed, you can execute the unit tests using:
+```
+composer test
+```
### Contributing
1. Check for open issues or open a fresh issue to start a discussion around a feature idea or a bug.
2. Fork [the repository](http://github.com/SparkPost/php-sparkpost) on GitHub to start making your changes to the **master** branch (or branch off of it).
3. Write a test which shows that the bug was fixed or that the feature works as expected.
4. Send a pull request and bug the maintainer until it gets merged and published. :) Make sure to add yourself to [AUTHORS](https://github.com/SparkPost/php-sparkpost/blob/master/AUTHORS.md).
-
diff --git a/composer.json b/composer.json
index 096a94b..efdf3a0 100644
--- a/composer.json
+++ b/composer.json
@@ -3,11 +3,16 @@
"description": "SDK for interfacing with SparkPost APIs",
"license": "Apache 2.0",
"authors": [
- {
- "name": "Message Systems, Inc."
- }
+ {
+ "name": "Message Systems, Inc."
+ }
],
"minimum-stability": "stable",
+ "scripts": {
+ "post-install-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
+ "post-update-cmd": "if [ ! -f 'examples/example-config.json' ]; then echo '{\n\t\"api-key\":\"Your API Key\"\n}' >> examples/example-config.json; fi",
+ "test": "phpunit --coverage-html test/output/report --bootstrap test/unit/bootstrap.php ./test/unit/"
+ },
"require": {
"php": ">=5.3.0",
"guzzlehttp/guzzle": "3.8.1"
diff --git a/composer.lock b/composer.lock
index 56e173b..b026858 100644
--- a/composer.lock
+++ b/composer.lock
@@ -1,9 +1,11 @@
{
"_readme": [
"This file locks the dependencies of your project to a known state",
- "Read more about it at http://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file"
+ "Read more about it at https://getcomposer.org/doc/01-basic-usage.md#composer-lock-the-lock-file",
+ "This file is @generated automatically"
],
- "hash": "6f9c9d455eb869305157559b093a3c5d",
+ "hash": "945d2c41acc99564b5d6f2ca51c76b4c",
+ "content-hash": "313616af849c93e0365f789a0a7ee985",
"packages": [
{
"name": "guzzlehttp/guzzle",
@@ -99,27 +101,28 @@
},
{
"name": "symfony/event-dispatcher",
- "version": "v2.5.6",
- "target-dir": "Symfony/Component/EventDispatcher",
+ "version": "v2.7.5",
"source": {
"type": "git",
- "url": "https://github.com/symfony/EventDispatcher.git",
- "reference": "804eb28dbbfba9ffdab21fe2066744906cea2212"
+ "url": "https://github.com/symfony/event-dispatcher.git",
+ "reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/EventDispatcher/zipball/804eb28dbbfba9ffdab21fe2066744906cea2212",
- "reference": "804eb28dbbfba9ffdab21fe2066744906cea2212",
+ "url": "https://api.github.com/repos/symfony/event-dispatcher/zipball/ae4dcc2a8d3de98bd794167a3ccda1311597c5d9",
+ "reference": "ae4dcc2a8d3de98bd794167a3ccda1311597c5d9",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.3.9"
},
"require-dev": {
"psr/log": "~1.0",
- "symfony/config": "~2.0",
- "symfony/dependency-injection": "~2.0,<2.6.0",
- "symfony/stopwatch": "~2.2"
+ "symfony/config": "~2.0,>=2.0.5",
+ "symfony/dependency-injection": "~2.6",
+ "symfony/expression-language": "~2.6",
+ "symfony/phpunit-bridge": "~2.7",
+ "symfony/stopwatch": "~2.3"
},
"suggest": {
"symfony/dependency-injection": "",
@@ -128,11 +131,11 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.5-dev"
+ "dev-master": "2.7-dev"
}
},
"autoload": {
- "psr-0": {
+ "psr-4": {
"Symfony\\Component\\EventDispatcher\\": ""
}
},
@@ -142,32 +145,32 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony EventDispatcher Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-01 15:43:05"
+ "homepage": "https://symfony.com",
+ "time": "2015-09-22 13:49:29"
}
],
"packages-dev": [
{
"name": "doctrine/instantiator",
- "version": "1.0.4",
+ "version": "1.0.5",
"source": {
"type": "git",
"url": "https://github.com/doctrine/instantiator.git",
- "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119"
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/doctrine/instantiator/zipball/f976e5de371104877ebc89bd8fecb0019ed9c119",
- "reference": "f976e5de371104877ebc89bd8fecb0019ed9c119",
+ "url": "https://api.github.com/repos/doctrine/instantiator/zipball/8e884e78f9f0eb1329e445619e04456e64d8051d",
+ "reference": "8e884e78f9f0eb1329e445619e04456e64d8051d",
"shasum": ""
},
"require": {
@@ -178,7 +181,7 @@
"ext-pdo": "*",
"ext-phar": "*",
"phpunit/phpunit": "~4.0",
- "squizlabs/php_codesniffer": "2.0.*@ALPHA"
+ "squizlabs/php_codesniffer": "~2.0"
},
"type": "library",
"extra": {
@@ -187,8 +190,8 @@
}
},
"autoload": {
- "psr-0": {
- "Doctrine\\Instantiator\\": "src"
+ "psr-4": {
+ "Doctrine\\Instantiator\\": "src/Doctrine/Instantiator/"
}
},
"notification-url": "https://packagist.org/downloads/",
@@ -208,20 +211,20 @@
"constructor",
"instantiate"
],
- "time": "2014-10-13 12:58:55"
+ "time": "2015-06-14 21:17:01"
},
{
"name": "phpunit/php-code-coverage",
- "version": "2.0.11",
+ "version": "2.2.3",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-code-coverage.git",
- "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7"
+ "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/53603b3c995f5aab6b59c8e08c3a663d2cc810b7",
- "reference": "53603b3c995f5aab6b59c8e08c3a663d2cc810b7",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-code-coverage/zipball/ef1ca6835468857944d5c3b48fa503d5554cff2f",
+ "reference": "ef1ca6835468857944d5c3b48fa503d5554cff2f",
"shasum": ""
},
"require": {
@@ -229,12 +232,12 @@
"phpunit/php-file-iterator": "~1.3",
"phpunit/php-text-template": "~1.2",
"phpunit/php-token-stream": "~1.3",
- "sebastian/environment": "~1.0",
+ "sebastian/environment": "^1.3.2",
"sebastian/version": "~1.0"
},
"require-dev": {
"ext-xdebug": ">=2.1.4",
- "phpunit/phpunit": "~4.1"
+ "phpunit/phpunit": "~4"
},
"suggest": {
"ext-dom": "*",
@@ -244,7 +247,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.0.x-dev"
+ "dev-master": "2.2.x-dev"
}
},
"autoload": {
@@ -253,9 +256,6 @@
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -273,7 +273,7 @@
"testing",
"xunit"
],
- "time": "2014-08-31 06:33:04"
+ "time": "2015-09-14 06:51:16"
},
{
"name": "phpunit/php-file-iterator",
@@ -322,16 +322,16 @@
},
{
"name": "phpunit/php-text-template",
- "version": "1.2.0",
+ "version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-text-template.git",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a"
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
- "reference": "206dfefc0ffe9cebf65c413e3d0e809c82fbf00a",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-text-template/zipball/31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
+ "reference": "31f8b717e51d9a2afca6c9f046f5d69fc27c8686",
"shasum": ""
},
"require": {
@@ -340,20 +340,17 @@
"type": "library",
"autoload": {
"classmap": [
- "Text/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
"authors": [
{
"name": "Sebastian Bergmann",
- "email": "sb@sebastian-bergmann.de",
+ "email": "sebastian@phpunit.de",
"role": "lead"
}
],
@@ -362,20 +359,20 @@
"keywords": [
"template"
],
- "time": "2014-01-30 17:20:04"
+ "time": "2015-06-21 13:50:34"
},
{
"name": "phpunit/php-timer",
- "version": "1.0.5",
+ "version": "1.0.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-timer.git",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c"
+ "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
- "reference": "19689d4354b295ee3d8c54b4f42c3efb69cbc17c",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-timer/zipball/3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
+ "reference": "3e82f4e9fc92665fafd9157568e4dcb01d014e5b",
"shasum": ""
},
"require": {
@@ -384,13 +381,10 @@
"type": "library",
"autoload": {
"classmap": [
- "PHP/"
+ "src/"
]
},
"notification-url": "https://packagist.org/downloads/",
- "include-path": [
- ""
- ],
"license": [
"BSD-3-Clause"
],
@@ -406,20 +400,20 @@
"keywords": [
"timer"
],
- "time": "2013-08-02 07:42:54"
+ "time": "2015-06-21 08:01:12"
},
{
"name": "phpunit/php-token-stream",
- "version": "1.3.0",
+ "version": "1.4.8",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/php-token-stream.git",
- "reference": "f8d5d08c56de5cfd592b3340424a81733259a876"
+ "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/f8d5d08c56de5cfd592b3340424a81733259a876",
- "reference": "f8d5d08c56de5cfd592b3340424a81733259a876",
+ "url": "https://api.github.com/repos/sebastianbergmann/php-token-stream/zipball/3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
+ "reference": "3144ae21711fb6cac0b1ab4cbe63b75ce3d4e8da",
"shasum": ""
},
"require": {
@@ -432,7 +426,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.3-dev"
+ "dev-master": "1.4-dev"
}
},
"autoload": {
@@ -455,7 +449,7 @@
"keywords": [
"tokenizer"
],
- "time": "2014-08-31 06:12:13"
+ "time": "2015-09-15 10:49:45"
},
{
"name": "phpunit/phpunit",
@@ -533,25 +527,26 @@
},
{
"name": "phpunit/phpunit-mock-objects",
- "version": "2.3.0",
+ "version": "2.3.7",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/phpunit-mock-objects.git",
- "reference": "c63d2367247365f688544f0d500af90a11a44c65"
+ "reference": "5e2645ad49d196e020b85598d7c97e482725786a"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/c63d2367247365f688544f0d500af90a11a44c65",
- "reference": "c63d2367247365f688544f0d500af90a11a44c65",
+ "url": "https://api.github.com/repos/sebastianbergmann/phpunit-mock-objects/zipball/5e2645ad49d196e020b85598d7c97e482725786a",
+ "reference": "5e2645ad49d196e020b85598d7c97e482725786a",
"shasum": ""
},
"require": {
- "doctrine/instantiator": "~1.0,>=1.0.1",
+ "doctrine/instantiator": "^1.0.2",
"php": ">=5.3.3",
- "phpunit/php-text-template": "~1.2"
+ "phpunit/php-text-template": "~1.2",
+ "sebastian/exporter": "~1.2"
},
"require-dev": {
- "phpunit/phpunit": "~4.3"
+ "phpunit/phpunit": "~4.4"
},
"suggest": {
"ext-soap": "*"
@@ -584,34 +579,34 @@
"mock",
"xunit"
],
- "time": "2014-10-03 05:12:11"
+ "time": "2015-08-19 09:14:08"
},
{
"name": "sebastian/comparator",
- "version": "1.0.1",
+ "version": "1.2.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/comparator.git",
- "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef"
+ "reference": "937efb279bd37a375bcadf584dec0726f84dbf22"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/e54a01c0da1b87db3c5a3c4c5277ddf331da4aef",
- "reference": "e54a01c0da1b87db3c5a3c4c5277ddf331da4aef",
+ "url": "https://api.github.com/repos/sebastianbergmann/comparator/zipball/937efb279bd37a375bcadf584dec0726f84dbf22",
+ "reference": "937efb279bd37a375bcadf584dec0726f84dbf22",
"shasum": ""
},
"require": {
"php": ">=5.3.3",
- "sebastian/diff": "~1.1",
- "sebastian/exporter": "~1.0"
+ "sebastian/diff": "~1.2",
+ "sebastian/exporter": "~1.2"
},
"require-dev": {
- "phpunit/phpunit": "~4.1"
+ "phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.2.x-dev"
}
},
"autoload": {
@@ -648,20 +643,20 @@
"compare",
"equality"
],
- "time": "2014-05-11 23:00:21"
+ "time": "2015-07-26 15:48:44"
},
{
"name": "sebastian/diff",
- "version": "1.2.0",
+ "version": "1.3.0",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/diff.git",
- "reference": "5843509fed39dee4b356a306401e9dd1a931fec7"
+ "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/5843509fed39dee4b356a306401e9dd1a931fec7",
- "reference": "5843509fed39dee4b356a306401e9dd1a931fec7",
+ "url": "https://api.github.com/repos/sebastianbergmann/diff/zipball/863df9687835c62aa423a22412d26fa2ebde3fd3",
+ "reference": "863df9687835c62aa423a22412d26fa2ebde3fd3",
"shasum": ""
},
"require": {
@@ -673,7 +668,7 @@
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2-dev"
+ "dev-master": "1.3-dev"
}
},
"autoload": {
@@ -700,32 +695,32 @@
"keywords": [
"diff"
],
- "time": "2014-08-15 10:29:00"
+ "time": "2015-02-22 15:13:53"
},
{
"name": "sebastian/environment",
- "version": "1.2.0",
+ "version": "1.3.2",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/environment.git",
- "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d"
+ "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/0d9bf79554d2a999da194a60416c15cf461eb67d",
- "reference": "0d9bf79554d2a999da194a60416c15cf461eb67d",
+ "url": "https://api.github.com/repos/sebastianbergmann/environment/zipball/6324c907ce7a52478eeeaede764f48733ef5ae44",
+ "reference": "6324c907ce7a52478eeeaede764f48733ef5ae44",
"shasum": ""
},
"require": {
"php": ">=5.3.3"
},
"require-dev": {
- "phpunit/phpunit": "~4.3"
+ "phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.2.x-dev"
+ "dev-master": "1.3.x-dev"
}
},
"autoload": {
@@ -750,32 +745,33 @@
"environment",
"hhvm"
],
- "time": "2014-10-22 06:38:05"
+ "time": "2015-08-03 06:14:51"
},
{
"name": "sebastian/exporter",
- "version": "1.0.2",
+ "version": "1.2.1",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/exporter.git",
- "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0"
+ "reference": "7ae5513327cb536431847bcc0c10edba2701064e"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/c7d59948d6e82818e1bdff7cadb6c34710eb7dc0",
- "reference": "c7d59948d6e82818e1bdff7cadb6c34710eb7dc0",
+ "url": "https://api.github.com/repos/sebastianbergmann/exporter/zipball/7ae5513327cb536431847bcc0c10edba2701064e",
+ "reference": "7ae5513327cb536431847bcc0c10edba2701064e",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.3.3",
+ "sebastian/recursion-context": "~1.0"
},
"require-dev": {
- "phpunit/phpunit": "~4.0"
+ "phpunit/phpunit": "~4.4"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "1.0.x-dev"
+ "dev-master": "1.2.x-dev"
}
},
"autoload": {
@@ -815,20 +811,73 @@
"export",
"exporter"
],
- "time": "2014-09-10 00:51:36"
+ "time": "2015-06-21 07:55:53"
+ },
+ {
+ "name": "sebastian/recursion-context",
+ "version": "1.0.1",
+ "source": {
+ "type": "git",
+ "url": "https://github.com/sebastianbergmann/recursion-context.git",
+ "reference": "994d4a811bafe801fb06dccbee797863ba2792ba"
+ },
+ "dist": {
+ "type": "zip",
+ "url": "https://api.github.com/repos/sebastianbergmann/recursion-context/zipball/994d4a811bafe801fb06dccbee797863ba2792ba",
+ "reference": "994d4a811bafe801fb06dccbee797863ba2792ba",
+ "shasum": ""
+ },
+ "require": {
+ "php": ">=5.3.3"
+ },
+ "require-dev": {
+ "phpunit/phpunit": "~4.4"
+ },
+ "type": "library",
+ "extra": {
+ "branch-alias": {
+ "dev-master": "1.0.x-dev"
+ }
+ },
+ "autoload": {
+ "classmap": [
+ "src/"
+ ]
+ },
+ "notification-url": "https://packagist.org/downloads/",
+ "license": [
+ "BSD-3-Clause"
+ ],
+ "authors": [
+ {
+ "name": "Jeff Welch",
+ "email": "whatthejeff@gmail.com"
+ },
+ {
+ "name": "Sebastian Bergmann",
+ "email": "sebastian@phpunit.de"
+ },
+ {
+ "name": "Adam Harvey",
+ "email": "aharvey@php.net"
+ }
+ ],
+ "description": "Provides functionality to recursively process PHP variables",
+ "homepage": "http://www.github.com/sebastianbergmann/recursion-context",
+ "time": "2015-06-21 08:04:50"
},
{
"name": "sebastian/version",
- "version": "1.0.3",
+ "version": "1.0.6",
"source": {
"type": "git",
"url": "https://github.com/sebastianbergmann/version.git",
- "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43"
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
- "reference": "b6e1f0cf6b9e1ec409a0d3e2f2a5fb0998e36b43",
+ "url": "https://api.github.com/repos/sebastianbergmann/version/zipball/58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
+ "reference": "58b3a85e7999757d6ad81c787a1fbf5ff6c628c6",
"shasum": ""
},
"type": "library",
@@ -850,34 +899,36 @@
],
"description": "Library that helps with managing the version number of Git-hosted PHP projects",
"homepage": "https://github.com/sebastianbergmann/version",
- "time": "2014-03-07 15:35:33"
+ "time": "2015-06-21 13:59:46"
},
{
"name": "symfony/yaml",
- "version": "v2.5.6",
- "target-dir": "Symfony/Component/Yaml",
+ "version": "v2.7.5",
"source": {
"type": "git",
- "url": "https://github.com/symfony/Yaml.git",
- "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726"
+ "url": "https://github.com/symfony/yaml.git",
+ "reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770"
},
"dist": {
"type": "zip",
- "url": "https://api.github.com/repos/symfony/Yaml/zipball/2d9f527449cabfa8543dd7fa3a466d6ae83d6726",
- "reference": "2d9f527449cabfa8543dd7fa3a466d6ae83d6726",
+ "url": "https://api.github.com/repos/symfony/yaml/zipball/31cb2ad0155c95b88ee55fe12bc7ff92232c1770",
+ "reference": "31cb2ad0155c95b88ee55fe12bc7ff92232c1770",
"shasum": ""
},
"require": {
- "php": ">=5.3.3"
+ "php": ">=5.3.9"
+ },
+ "require-dev": {
+ "symfony/phpunit-bridge": "~2.7"
},
"type": "library",
"extra": {
"branch-alias": {
- "dev-master": "2.5-dev"
+ "dev-master": "2.7-dev"
}
},
"autoload": {
- "psr-0": {
+ "psr-4": {
"Symfony\\Component\\Yaml\\": ""
}
},
@@ -887,22 +938,24 @@
],
"authors": [
{
- "name": "Symfony Community",
- "homepage": "http://symfony.com/contributors"
- },
- {
"name": "Fabien Potencier",
"email": "fabien@symfony.com"
+ },
+ {
+ "name": "Symfony Community",
+ "homepage": "https://symfony.com/contributors"
}
],
"description": "Symfony Yaml Component",
- "homepage": "http://symfony.com",
- "time": "2014-10-01 05:50:18"
+ "homepage": "https://symfony.com",
+ "time": "2015-09-14 14:14:09"
}
],
"aliases": [],
"minimum-stability": "stable",
"stability-flags": [],
+ "prefer-stable": false,
+ "prefer-lowest": false,
"platform": {
"php": ">=5.3.0"
},
diff --git a/examples/transmission/get_all_transmissions.php b/examples/transmission/get_all_transmissions.php
index db06b68..fb62ec7 100644
--- a/examples/transmission/get_all_transmissions.php
+++ b/examples/transmission/get_all_transmissions.php
@@ -2,11 +2,14 @@
namespace Examples\Transmisson;
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 SparkPost\Transmission;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+SparkPost::setConfig(array('key'=>$config['api-key']));
try {
$results = Transmission::all();
@@ -14,4 +17,4 @@ try {
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>
diff --git a/examples/transmission/get_transmission.php b/examples/transmission/get_transmission.php
index 574388c..b4781d7 100644
--- a/examples/transmission/get_transmission.php
+++ b/examples/transmission/get_transmission.php
@@ -1,11 +1,15 @@
<?php
namespace Examples\Transmisson;
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 SparkPost\Transmission;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+SparkPost::setConfig(array('key'=>$config['api-key']));
try {
$results = Transmission::find('Your Transmission Id');
@@ -13,4 +17,4 @@ try {
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>
diff --git a/examples/transmission/rfc822.php b/examples/transmission/rfc822.php
index b97bbb9..8163693 100644
--- a/examples/transmission/rfc822.php
+++ b/examples/transmission/rfc822.php
@@ -1,11 +1,15 @@
<?php
namespace Examples\Transmisson;
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 SparkPost\Transmission;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+SparkPost::setConfig(array('key'=>$config['api-key']));
try {
$results = Transmission::send(array(
@@ -22,4 +26,4 @@ try {
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>
diff --git a/examples/transmission/send_transmission_all_fields.php b/examples/transmission/send_transmission_all_fields.php
index 30f7793..28edbcc 100644
--- a/examples/transmission/send_transmission_all_fields.php
+++ b/examples/transmission/send_transmission_all_fields.php
@@ -1,11 +1,15 @@
<?php
namespace Examples\Transmisson;
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 SparkPost\Transmission;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+SparkPost::setConfig(array('key'=>$config['api-key']));
try{
$results = Transmission::send(array(
@@ -40,4 +44,4 @@ try{
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>
diff --git a/examples/transmission/simple_send.php b/examples/transmission/simple_send.php
index 8149238..eafc176 100644
--- a/examples/transmission/simple_send.php
+++ b/examples/transmission/simple_send.php
@@ -1,12 +1,15 @@
<?php
-namespace Examples\Transmisson;
+namespace Examples\Transmisson;
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 SparkPost\Transmission;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+SparkPost::setConfig(array('key'=>$config['api-key']));
try {
$results = Transmission::send(array(
@@ -26,4 +29,4 @@ try {
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>
diff --git a/examples/transmission/stored_recipients_inline_content.php b/examples/transmission/stored_recipients_inline_content.php
index dbb7c1d..a2dd8aa 100644
--- a/examples/transmission/stored_recipients_inline_content.php
+++ b/examples/transmission/stored_recipients_inline_content.php
@@ -1,11 +1,15 @@
<?php
namespace Examples\Transmisson;
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 SparkPost\Transmission;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+SparkPost::setConfig(array('key'=>$config['api-key']));
try {
@@ -22,4 +26,4 @@ try {
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>
diff --git a/examples/transmission/stored_template_send.php b/examples/transmission/stored_template_send.php
index cda6de6..52dbb27 100644
--- a/examples/transmission/stored_template_send.php
+++ b/examples/transmission/stored_template_send.php
@@ -1,11 +1,15 @@
<?php
namespace Examples\Transmisson;
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 SparkPost\Transmission;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+SparkPost::setConfig(array('key'=>$config['api-key']));
try {
$results = Transmission::send(array(
@@ -23,4 +27,4 @@ try {
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>
diff --git a/examples/unwrapped/create_template.php b/examples/unwrapped/create_template.php
index 717430f..0e24fd6 100644
--- a/examples/unwrapped/create_template.php
+++ b/examples/unwrapped/create_template.php
@@ -1,16 +1,20 @@
<?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 SparkPost\APIResource;
-$key = 'YOURAPIKEY';
-SparkPost::setConfig(array('key'=>$key));
+SparkPost::setConfig(array('key'=>$config['api-key']));
try {
// define the endpoint
APIResource::$endpoint = 'templates';
-
+
$templateConfig = array(
'name' => 'Summer Sale!',
'content.from' => 'marketing@bounces.company.example',
@@ -22,4 +26,4 @@ try {
} catch (\Exception $exception) {
echo $exception->getMessage();
}
-?> \ No newline at end of file
+?>