Skip to content

Commit e9cf6db

Browse files
committed
readme updates
1 parent 41d8605 commit e9cf6db

File tree

1 file changed

+10
-1
lines changed

1 file changed

+10
-1
lines changed

README.md

Lines changed: 10 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ $mailchimp
118118
->get();
119119
```
120120

121-
Notice that I provided a `list_id` to the `lists()` method, as there would be no way to retrieve a list of subscribers from a lists collection. The above request however will only return 10 subscriber instances from the members collection. This is because MailChimp's API uses pagination (documented [HERE](http://developer.mailchimp.com/documentation/mailchimp/guides/get-started-with-mailchimp-api-3/#parameters)) that defaults to `count=10` and `offset=0`. This library allows you to alter query string parameters by by passing them as an argument to the `GET()` method. We do this by providing an array of key-value pairs where the keys are the query parameter you wish to provide/alter and its value is the parameter's value. As an example if I wanted to retrieve the second 100 subscribers from my list I could:
121+
Notice that I provided a `list_id` to the `lists()` method, as there would be no way to retrieve a list of subscribers from a lists collection. The above request however will only return 10 subscriber instances from the members collection. This is because MailChimp's API uses pagination (documented [HERE](http://developer.mailchimp.com/documentation/mailchimp/guides/get-started-with-mailchimp-api-3/#parameters)) that defaults to `count=10` and `offset=0`. This library allows you to alter query string parameters by passing them as an argument to the `GET()` method. We do this by providing an array of key-value pairs where the keys are the query parameter you wish to provide/alter and its value is the parameter's value. As an example if I wanted to retrieve the second 100 subscribers from my list I could:
122122

123123
```php
124124
$mailchimp
@@ -145,6 +145,15 @@ $mailchimp
145145
->get();
146146
```
147147

148+
Alternatively in place of providing an md5 hash as the identifier to the `members()` function you can also simply provide the email address as a string and this library will do the hashing for you. Like this:
149+
150+
```php
151+
$mailchimp
152+
->lists('1a2b3c4d')
153+
->members('example@domain.com')
154+
->get();
155+
```
156+
148157
> You can read about `GET` requests in depth here: https://github.com/Jhut89/Mailchimp-API-3.0-PHP/wiki/Get-Requests
149158
### POST
150159

0 commit comments

Comments
 (0)