定制 alfredo-ramos/mailrelay-api-client 二次开发

按需修改功能、优化性能、对接业务系统,提供一站式技术支持

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

alfredo-ramos/mailrelay-api-client

Composer 安装命令:

composer require alfredo-ramos/mailrelay-api-client

包简介

Mailrelay API Client

README 文档

README

About

A Mailrelay API client.

Build Status Latest Stable Version Code Quality License

⚠️ While all API endpoints have been implemented, it's still under development, so it might have some bugs.

Requirements

  • PHP 8.1.0 or greater

Installation

Open your composer.json file and add the package in the require object:

"alfredo-ramos/mailrelay-api-client": "^0.3.0"

Then run composer update on your terminal.

Usage

The constructor takes an array with the API data needed to connect with your Mailrelay account.

require __DIR__ . '/vendor/autoload.php';

$mailrelay = new AlfredoRamos\Mailrelay\Client([
	'api_account' => 'mailrelay_account',
	'api_token' => 'mailrelay_api_token'
]);
Key Type Required Description
api_account string Yes The account name you use to login into Mailrelay.
api_token string Yes The Mailrelay API token generated from https://{ACCOUNT}.ipzmarketing.com/admin/api_keys.

You can access each endpoint using the AlfredoRamos\Mailrelay\Client::api() method.

// Create or update a subscriber
$mailrelay->api('subscribers')->sync([
	'status' => 'active',
	'email' => 'user@example.org',
	'group_ids' => [1]
]);

// Get account package info
$mailrelay->api('package')->info();

To get the number of total pages and results per page for list() methods:

$result = $this->client->withOptions(['full_response' => true])->api('subscribers')->list([
	'page' => 1, 'per_page' => 10
]);
$subscribers = $result->toArray();
$total = $result->totalPages();
$perPage = $result->perPage();

For more detailed information about Mailrelay API endpoints, please refer to the official API documentation.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: GPL-3.0-or-later
  • 更新时间: 2021-04-02

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固