library mailchimp-api-wrapper
mjp91/mailchimp-api-wrapper
- Monday, November 20, 2017
- by mjp91
- Repository
- 1 Watchers
- 0 Stars
- 24 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 4 Versions
- 4 % Grown
MailChimp API Wrapper
Lightweight wrapper library for MailChimp API, (*1)
Example Usage
// construct the request handler, passing in data centre, username and API key
$requestHandler = new \MailChimp\RequestHandler("us14", "you@example.com", "abc123");
// construct the request class for the API call, passing in any required URL parameters
$subscriberGet = new ReadSubscribers("4494d94b5a");
// optionally add a request body (if required by the API)
$requestBody = array("..." => "...");
$subscriberGet->setRequestBody($requestBody);
// send the request, returns an associative array
try {
$response = $requestHandler->handle($subscriberGet);
// $response->getHTTPCode();
// $response->getResponseBody();
} catch (RequestFailureException $ex) {
// a HTTP code returned indicating failure will cause an exception
$httpCode = $ex->getResponse()->getHttpCode();
$response = $ex->getResponse()->getResponseBody();
}
dev-master
9999999-dev
Sources
Download
MIT
The Requires
The Development Requires
by
Matthew Pearsall
1.0.2
1.0.2.0
Sources
Download
MIT
The Requires
The Development Requires
by
Matthew Pearsall
1.0.1
1.0.1.0
Sources
Download
MIT
The Requires
The Development Requires
by
Matthew Pearsall
1.0.0
1.0.0.0
Sources
Download
MIT
The Requires
The Development Requires
by
Matthew Pearsall