承接 minutemailer/api 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

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

minutemailer/api

最新稳定版本:v1.0.0

Composer 安装命令:

composer require minutemailer/api

包简介

Minutemailer API PHP wrapper

README 文档

README

This library allows you to quickly get started with the Minutemailer API via PHP. Libraries for other languages will come soon.

Before you get started, read the API documentation.

Installation

$ composer require minutemailer/api or download the php-file Minutemailer.php if you are not using composer.

Usage

First you need to create an API token. You can do so by logging in to your Minutemailer account and go to the API settings page.

Make sure the file is loaded, either by require 'vendor/autoload.php' if you are using composer or require 'path/Minutemailer.php' if you are not.

<?php

require 'vendor/autoload.php';

$personalAccessToken = 'myAccessToken';

$client = new Minutemailer\Minutemailer($personalAccessToken);

// Create new contact and add it to list
$response = $client->contacts()->create('validemail@domain.com', ['first_name' => 'Firstname', 'last_name' => 'Lastname'], ['123abc']);

$contact_id = $response->id;

// Add existing contact to list
$response = $client->contact_lists('123abc')->addContact($contact_id);

// Resubscribe unsubscribed contact
$response = $client->contacts($contact_id)->update(['status' => 1]);

Email is required and name is optional. $response will be filled with the contact data if the request is valid. Otherwise, an error will be returned.

统计信息

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

GitHub 信息

  • Stars: 0
  • Watchers: 4
  • Forks: 1
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-08-30