vatps/mailchimp-rest-api 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

vatps/mailchimp-rest-api

最新稳定版本:v1.0

Composer 安装命令:

composer require vatps/mailchimp-rest-api

包简介

Very Easy to use MailChimp REST Enabled API 3.0 Wrapper Class.

README 文档

README

Very Easy to use MailChimp REST Enabled API 3.0 Wrapper Class in PHP.

Requires PHP 5.3 and curl extension.

Installation

You can install the mailchimp-rest-api using Composer. Just add the following to your composer.json:

{ "require": { "vatps/mailchimp-rest-api": "dev-master" } } 

You will then need to:

  • run composer install to get these dependencies added to your vendor directory
  • add the autoloader to your application with this line: require("vendor/autoload.php")

Alternatively you can just download the MailChimp.php file and include it manually.

Laravel Installation

Run composer require vatps/mailchimp-rest-api in terminal.

Laravel Example

<?php use \VPS\MailChimp; $mc = new MailChimp(); $mc->setApiKey('yourapikeyhere-us1'); $result = $mc->get('/lists/'); return $result; 

You can find all available Resources at http://kb.mailchimp.com/api/resources

Examples

Create New Instance and set mailchimp API Key.

<?php $mc = new \VPS\MailChimp('yourapikeyhere-us1'); 

Lists Collection (GET /lists/)

<?php $result = $mc->get('/lists/'); print_r($result); 

Lists Instance (GET /lists/{list_id})

<?php $result = $mc->get('/lists/{list_id}'); print_r($result); 

REMOVE LIST (DELETE /lists/{list_id})

<?php $mc->delete('/lists/{list_id}'); 

Subscribe to a list (POST /lists/{list_id}/members)

<?php $result = $mc->post('/lists/{list_id}/members', array( 'email_address' => 'test@vps.com', 'merge_fields' => array('FNAME'=>'VAT', 'LNAME'=>'PS'), 'status' => 'subscribed' )); print_r($result); 

Contact me if you need any help.

统计信息

  • 总下载量: 75.22k
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 28
  • 点击次数: 1
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 28
  • Watchers: 7
  • Forks: 2
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2026-01-04

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固