From 4ca9d8b08d2e09e04153d86ef79fb1b228a03ebf Mon Sep 17 00:00:00 2001 From: Travis Swientek Date: Sun, 28 Jul 2013 15:47:30 -0700 Subject: [PATCH 1/5] Adjusted readme and exceptions --- README.md | 13 ++++++++----- .../Exceptions/MissingRequiredMIMEParameters.php | 6 ++++++ tests/Mailgun/globals.php | 13 ------------- 3 files changed, 14 insertions(+), 18 deletions(-) create mode 100644 src/Mailgun/Messages/Exceptions/MissingRequiredMIMEParameters.php delete mode 100644 tests/Mailgun/globals.php diff --git a/README.md b/README.md index 838ee3d..ef48829 100644 --- a/README.md +++ b/README.md @@ -2,7 +2,8 @@ Mailgun-PHP-SDK =========== [![Build Status](https://magnum.travis-ci.com/travelton/Mailgun-PHP.png?token=3stPWthMYq4p7xpVNV9Y&branch=master)](https://magnum.travis-ci.com/travelton/Mailgun-PHP) -This is the Mailgun PHP SDK. This SDK contains methods for easily interacting with the Mailgun API. Below are examples to get you started. +This is the Mailgun PHP SDK. This SDK contains methods for easily interacting with the Mailgun API. Below are examples to get you started. For additional examples, +please see our SDK documentation at http://documentation.mailgun.com Installation ----- @@ -15,7 +16,7 @@ curl -sS https://getcomposer.org/installer | php # Add Mailgun as a dependency php composer.phar require mailgun/mailgun-php-sdk:~1.0 ``` -Next, require Composer's autoloader to automatically load the Mailgun SDK in your project: +Next, require Composer's autoloader, in your application, to automatically load the Mailgun SDK in your project: ```PHP require 'vendor/autoload.php'; ``` @@ -24,7 +25,7 @@ Usage ----- Using the SDK should feel simple, if you're already familiar with our API endpoints. If not, no problem... When you're reviewing our documentation, the endpoints are expressed as a class in the SDK to make things easier. -Here's an example for sending a message: +For example, here's how to use the "Messages" API endpoint: ```php # First, instantiate the client with your API credentials and domain. @@ -48,7 +49,7 @@ Advanced Usage You've sent your first message, awesome! Let's move on to more advanced use cases. #### Message Builder -Message Builder makes creating your messages really intuitive. If you despise arrays, or your workflow is better off defining each part of the MIME separately, use this! +Message Builder makes creating your messages really intuitive. If you despise arrays, or your workflow is better off defining each part of the message separately, use Message Builder! ```php # First, instantiate the client with your API credentials and domain. @@ -81,7 +82,9 @@ $message->sendMessage(); ``` #### Batch Sending -Batch sending allows you to submit up to 1,000 messages per API call. This is the best way to send a large amount of messages as quickly as possible. In the example below, we'll use the Message Builder object to create a message. While Message Builder is the preferred method, you can also run "setMessage()" and pass a fully formed array of data. +Batch sending allows you to submit up to 1,000 messages per API call. This is the best way to send a large amount of messages as quickly as possible. In the example below, we'll use the Message Builder object to create a message. + +_Note: While Message Builder is the preferred method, you can also run "setMessage()" (see above example) to pass a fully formed array of data._ ```php # First, instantiate the client with your API credentials and domain. diff --git a/src/Mailgun/Messages/Exceptions/MissingRequiredMIMEParameters.php b/src/Mailgun/Messages/Exceptions/MissingRequiredMIMEParameters.php new file mode 100644 index 0000000..754f47e --- /dev/null +++ b/src/Mailgun/Messages/Exceptions/MissingRequiredMIMEParameters.php @@ -0,0 +1,6 @@ + \ No newline at end of file diff --git a/tests/Mailgun/globals.php b/tests/Mailgun/globals.php deleted file mode 100644 index a6ca1e1..0000000 --- a/tests/Mailgun/globals.php +++ /dev/null @@ -1,13 +0,0 @@ - \ No newline at end of file From 49ee6f18b89e8e2b0ebddd3367186453229e7a20 Mon Sep 17 00:00:00 2001 From: Travis Swientek Date: Sun, 28 Jul 2013 16:08:16 -0700 Subject: [PATCH 2/5] Version 0.1 release --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index ef48829..55b3940 100644 --- a/README.md +++ b/README.md @@ -14,7 +14,7 @@ To install the SDK, you will need to be using Composer in your project. If you a curl -sS https://getcomposer.org/installer | php # Add Mailgun as a dependency -php composer.phar require mailgun/mailgun-php-sdk:~1.0 +php composer.phar require mailgun/mailgun-php-sdk:~0.1 ``` Next, require Composer's autoloader, in your application, to automatically load the Mailgun SDK in your project: ```PHP From e45228df0bde4dcb0bf09c834d2218639c3f4c7b Mon Sep 17 00:00:00 2001 From: Travis Swientek Date: Sun, 28 Jul 2013 16:13:20 -0700 Subject: [PATCH 3/5] Testing PHP versions --- .travis.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.travis.yml b/.travis.yml index f7e86cd..7bc1ce0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -3,6 +3,9 @@ language: php php: - 5.4 - 5.5 + - 5.3 + - 5.2 + - 5.1 before_script: - echo 'Installing composer dependencies now!' From ffdf3925b5259b07294af2e10d672227bf0ff021 Mon Sep 17 00:00:00 2001 From: Travis Swientek Date: Sun, 28 Jul 2013 16:16:22 -0700 Subject: [PATCH 4/5] Turned off composer dev requirement --- .travis.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7bc1ce0..c921289 100644 --- a/.travis.yml +++ b/.travis.yml @@ -9,4 +9,4 @@ php: before_script: - echo 'Installing composer dependencies now!' - - composer install --dev + - composer install From 4cb3d44bec1e7cb5ddd6d85808da1ceabe9018f4 Mon Sep 17 00:00:00 2001 From: Travis Swientek Date: Sun, 28 Jul 2013 16:19:11 -0700 Subject: [PATCH 5/5] Testing complete. Oldest supported version 5.3 --- .travis.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index c921289..df44001 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,11 +1,9 @@ language: php php: + - 5.3 - 5.4 - 5.5 - - 5.3 - - 5.2 - - 5.1 before_script: - echo 'Installing composer dependencies now!'