API Client for MailChimp v3 with a complete model
Uses MailChimp API v3.
- PHP >= 7.4 with cURL extension
- Guzzle or any other "php-http/client-implementation
composer require stefna/php-mailchimp-api-v3
<?php
// This file is generated by Composer
require_once 'vendor/autoload.php';
$factory = new \Nyholm\Psr7\Factory\Psr17Factory();
$client = new \Stefna\MailChimp\Client(
httpClient: $httpClient,
apiKey: $apiKey,
requestFactory: $factory,
uriFactory: $factory,
streamFactory: $factory,
);
$allMembers = $client->lists()->members($listId)->all();
$email = $allMembers[0]->emailAddress;
The MIT License (MIT). Please see License File for more information.