stefna/php-mailchimp-api-v3

Mailchimp v3 API client for PHP

Installs: 324

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 6

Forks: 0

Open Issues: 0

pkg:composer/stefna/php-mailchimp-api-v3

2.0.1 2023-11-29 09:03 UTC

README

API Client for MailChimp v3 with a complete model

Uses MailChimp API v3.

Requirements

  • PHP >= 7.4 with cURL extension
  • Guzzle or any other "php-http/client-implementation

Installation

composer require stefna/php-mailchimp-api-v3

Basic usage

<?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;

License

The MIT License (MIT). Please see License File for more information.