-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Updating the Mailchimp module to 7.x-5.2.
- Loading branch information
Showing
239 changed files
with
33,874 additions
and
10,957 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,96 @@ | ||
# Contributing | ||
|
||
Thank you for taking the time to help us develop the MailChimp library! | ||
|
||
We do all our work on GitHub. If you'd like to help, you can create a | ||
[free GitHub account here](https://github.com/join). | ||
|
||
## Reporting an issue | ||
|
||
For bug reports or feature requests, please [create a new issue](https://github.com/thinkshout/mailchimp-api-php/issues). | ||
|
||
If reporting a bug, please: | ||
|
||
* Let us know what steps we can take to reproduce the bug | ||
* Include any error messages you received | ||
|
||
## Submitting changes | ||
|
||
The best way to submit a bug fix or improvement is through a [pull request](https://help.github.com/articles/creating-a-pull-request-from-a-fork/). | ||
|
||
* [Fork](https://guides.github.com/activities/forking/), then clone the repository: | ||
|
||
`git clone [email protected]:YOUR-GITHUB-USERNAME/mailchimp-api-php.git` | ||
|
||
* Install the library's dependencies using [Composer](https://getcomposer.org/): | ||
|
||
```shell | ||
cd mailchimp-api-php | ||
composer install | ||
``` | ||
|
||
* If you are adding new functionality, please add a corresponding test. | ||
See [Testing](#testing) for more information. | ||
|
||
* After making your changes, ensure all tests pass. | ||
|
||
* Commit and push your changes to your fork of the repository. | ||
|
||
* [Submit a pull request](https://github.com/thinkshout/mailchimp-api-php/pulls). | ||
|
||
## Testing | ||
|
||
This library includes a [PHPUnit](https://phpunit.de/) test suite. Keeping these | ||
tests up to date helps us ensure the library is reliable. | ||
|
||
### Running PHPUnit tests | ||
|
||
Add Composer's vendor directory to your PATH by adding the following line to | ||
your profile. This is dependent on your system, but on a Linux or Mac OSX system | ||
using Bash, you'll typically find the file at *~/.bash_profile*. | ||
|
||
`export PATH="./vendor/bin:$PATH"` | ||
|
||
Bash example: | ||
|
||
```shell | ||
echo 'export PATH="./vendor/bin:$PATH"' >> ~/.bash_profile | ||
source ~/.bash_profile | ||
``` | ||
|
||
Then run PHPUnit: | ||
|
||
`phpunit` | ||
|
||
### Creating new tests | ||
|
||
Tests are located in the *tests* directory and are grouped into PHP files named | ||
after the library component they are testing. For example, | ||
*MailchimpCampaignsTest.php* contains tests for MailChimp Campaigns. | ||
|
||
New tests should contain at least the functionality in this simple test: | ||
|
||
```php | ||
public function testGetCampaigns() { | ||
$mc = new MailchimpCampaigns(); | ||
$mc->getCampaigns(); | ||
|
||
$this->assertEquals('GET', $mc->getClient()->method); | ||
$this->assertEquals($mc->getEndpoint() . '/campaigns', $mc->getClient()->uri); | ||
} | ||
``` | ||
|
||
This test checks the request type and request URI are both correct. | ||
|
||
More advanced examples can be found in the *tests* directory. | ||
|
||
## Additional resources | ||
|
||
* [MailChimp API documentation](http://developer.mailchimp.com/documentation/mailchimp/) | ||
* [MailChimp Drupal module](https://www.drupal.org/project/mailchimp), MailChimp integration for Drupal using this library. | ||
* [MailChimp E-Commerce Drupal module](https://www.drupal.org/project/mailchimp_ecommerce), MailChimp integration for Drupal Commerce using this library. | ||
* [ThinkShout](https://thinkshout.com), the library maintainer. | ||
|
||
## Want to help build this and other open source projects? | ||
|
||
We're hiring software engineers! Check out our [careers page](https://thinkshout.com/careers/). |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# PHP library for v3 of the MailChimp API | ||
|
||
This library provides convenient wrapper functions for MailChimp's REST API. | ||
The API is [documented here](http://developer.mailchimp.com/documentation/mailchimp/guides/get-started-with-mailchimp-api-3/). | ||
|
||
## Requirements | ||
|
||
- PHP 5.4.0 or greater (7.0 or greater if you wish to use phpunit) | ||
- [Composer](https://getcomposer.org/) | ||
- [Guzzle](https://github.com/guzzle/guzzle) | ||
|
||
## Installation | ||
|
||
Dependencies are managed by [Composer](https://getcomposer.org/). After | ||
installing Composer, run the following command from the library root: | ||
|
||
`composer install --no-dev --ignore-platform-reqs` | ||
|
||
Or to install with phpunit: | ||
|
||
`composer install` | ||
|
||
## Testing | ||
|
||
This library includes a [PHPUnit](https://phpunit.de/) test suite. | ||
|
||
### Running PHPUnit tests | ||
|
||
Add Composer's vendor directory to your PATH by adding the following line to | ||
your profile. This is dependent on your system, but on a Linux or Mac OSX system | ||
using Bash, you'll typically find the file at *~/.bash_profile*. | ||
|
||
`export PATH="./vendor/bin:$PATH"` | ||
|
||
Bash example: | ||
|
||
```shell | ||
echo 'export PATH="./vendor/bin:$PATH"' >> ~/.bash_profile | ||
source ~/.bash_profile | ||
``` | ||
|
||
Then run PHPUnit: | ||
|
||
`phpunit` | ||
|
||
### MailChimp API Playground | ||
|
||
MailChimp's [API Playground](https://us1.api.mailchimp.com/playground/) provides | ||
access to all API methods via a web-based UI. You can use this to test API calls | ||
and review data you've sent to MailChimp. |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
{ | ||
"name": "thinkshout/mailchimp-api-php", | ||
"version": "1.0.9", | ||
"type": "library", | ||
"description": "PHP library for v3 of the MailChimp API", | ||
"keywords": ["mailchimp", "mail"], | ||
"homepage": "https://github.com/thinkshout/mailchimp-api-php", | ||
"require": { | ||
"php": ">=5.4.0", | ||
"guzzlehttp/guzzle": "^6.2.1" | ||
}, | ||
"require-dev": { | ||
"phpunit/phpunit": "^6.2.2" | ||
}, | ||
"autoload": { | ||
"psr-4": { | ||
"Mailchimp\\": "src/", | ||
"Mailchimp\\http\\": "src/http/" | ||
} | ||
}, | ||
"autoload-dev": { | ||
"psr-4": { | ||
"Mailchimp\\Tests\\": "tests/src/" | ||
} | ||
} | ||
} |
Oops, something went wrong.