You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+6-62Lines changed: 6 additions & 62 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,34 +1,3 @@
1
-
## VERSION 3.0.0 COMING - August 27th 2018
2
-
3
-
Version 3.0.0 of this library will introduce several *new features*, and some **breaking changes**.
4
-
`master` is the current dev branch for version 3.0.0. A formal release with a tag will be made once it is considered stable.
5
-
6
-
### Incoming Features
7
-
8
-
* Namespaced classes
9
-
* Full PSR-4 Autoloading via _Composer_
10
-
* Tests
11
-
* Programmatically alterable settings
12
-
* Success & Failure Callbacks
13
-
* Support for new endpoints
14
-
15
-
### Breaks From Older Versions
16
-
17
-
* No non-autoloading option
18
-
* Class names and directory structure changes
19
-
20
-
If these changes are breaking for your app we suggest you wait on updating to 3.0.0. Upcoming changes can now be viewed in `master` (`dev-master` on [packagist](https://packagist.org/packages/jhut89/mailchimp3php)) before the release is made. As well feel free to pull in an
21
-
older version by requiring the version you want in your `composer.json`:
22
-
23
-
```json
24
-
{
25
-
"require": {
26
-
"jhut89/mailchimp3php": "2.3.*"
27
-
}
28
-
}
29
-
30
-
```
31
-
32
1
# Table Of Contents
33
2
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
34
3
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
@@ -44,10 +13,6 @@ older version by requiring the version you want in your `composer.json`:
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
53
18
@@ -178,6 +143,7 @@ $mailchimp
178
143
->get();
179
144
```
180
145
146
+
> You can read about `GET` requests in depth here: https://github.com/Jhut89/Mailchimp-API-3.0-PHP/wiki/Get-Requests
181
147
### POST
182
148
183
149
While being able to retrieve data from your account is great we also need to be able to post new data. This can be done by calling the `POST()` method at the end of a chain. As an example subscribing an address to a list would look like this:
@@ -214,6 +180,7 @@ $mailchimp
214
180
->members()
215
181
->post($post_params);
216
182
```
183
+
> You can read about `POST` requests in depth here: https://github.com/Jhut89/Mailchimp-API-3.0-PHP/wiki/Post-Requests
217
184
218
185
### PATCH & PUT
219
186
@@ -227,6 +194,7 @@ $mailchimp
227
194
"merge_fields" => ["FNAME" => "Jane"]
228
195
]);
229
196
```
197
+
> You can read about `PATCH` & `PUT` requests in depth here: https://github.com/Jhut89/Mailchimp-API-3.0-PHP/wiki/Patch-&-Put-Requests
230
198
231
199
### DELETE
232
200
@@ -238,6 +206,7 @@ $mailchimp
238
206
->members('a1167f5be2df7113beb69c95ebcdb2fd')
239
207
->delete();
240
208
```
209
+
> You can read about `DELETE` requests in depth here: https://github.com/Jhut89/Mailchimp-API-3.0-PHP/wiki/Delete-Requests
241
210
## Handling A Response
242
211
243
212
Methods named for http verbs such as `get()` ,`post()`, `patch()`, `put()`, or `delete()` kick off an over the wire request to MailChimp's A.P.I. Given a successful request these methods return an instance of a `MailchimpResponse`.
@@ -267,6 +236,8 @@ $contact_email = $account
267
236
print $contact_email; // outputs something like "example@domain.com"
268
237
```
269
238
239
+
> You can read about how to work with responses in depth here: https://github.com/Jhut89/Mailchimp-API-3.0-PHP/wiki/Handling-A-Response
\*Please see [MailChimp's API Documentation](http://developer.mailchimp.com/documentation/mailchimp/reference/overview/) for what verbs are appropriate where.
409
380
410
381
\** Methods marked with a `*` make a network request
411
-
## Settings
412
-
413
-
This library offers several setting that can be altered by changing the value of the class constants at the begining of the `Mailchimp` class in the `mailchimpRoot.php` file. Be sure to check them out to see if they can be altered to fit your project a little better.
414
-
415
-
### Debugger
416
-
This library has a very small debug function that will allow you to output some request information and what was returned. This can be turned on by setting:
417
-
418
-
```php
419
-
const DEBUGGER = true;
420
-
```
421
-
The debugger can also log to a file if you provide a file for it to write to using `const DEBUGGER_LOG_FILE` like this:
0 commit comments