定制 yournotify/yournotify-php-sdk 二次开发

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

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

yournotify/yournotify-php-sdk

Composer 安装命令:

composer require yournotify/yournotify-php-sdk

包简介

A PHP SDK for interacting with Yournotify API. Send email and sms marketing campaigns with ease.

README 文档

README

Installation

To install the Yournotify PHP SDK, you can use Composer. Run the following command in your terminal:

composer require yournotify/yournotify-php-sdk

Usage

To use the Yournotify SDK, you need to include the autoload file and create an instance of the Yournotify class with your API key.

require 'vendor/autoload.php';

$apiKey = 'your_api_key_here';
$yournotify = new Yournotify($apiKey);

Available Methods

Sending an Email

$response = $yournotify->sendEmail('Title', 'Subject', '<h1>Hello</h1>', 'Hello', 'running', 'sender@example.com', 'recipient@example.com', 'Name', ['key' => 'value']);
print_r($response);

Sending an SMS

$response = $yournotify->sendSMS('Title', 'Subject', 'Hello', 'running', 'SENDER_ID', '+2348100000000', 'Name', ['key' => 'value']);
print_r($response);

Adding a Contact

$response = $yournotify->addContact('email@example.com', '+2348100000000', 'list_id', 'Contact Name', ['key' => 'value']);
print_r($response);

Getting All Contacts

$response = $yournotify->getContacts();
print_r($response);

Deleting a Contact

$response = $yournotify->deleteContact(123);
print_r($response);

Adding a List

$response = $yournotify->addList('Title', 'public', 'single');
print_r($response);

Getting All Lists

$response = $yournotify->getLists();
print_r($response);

Deleting a List

$response = $yournotify->deleteList(456);
print_r($response);

Deleting a Campaign

$response = $yournotify->deleteCampaign(789);
print_r($response);

Getting Campaign Stats

$response = $yournotify->getCampaignStats(123, 'email');
print_r($response);

Getting Campaign Reports

$response = $yournotify->getCampaignReports(123, 'sms');
print_r($response);

API Methods Reference

  • sendEmail($title, $subject, $html, $text, $status, $from, $to, $name, $attribs): Sends an email.
  • sendSMS($title, $subject, $text, $status, $from, $to, $name, $attribs): Sends an SMS.
  • addContact($email, $telephone, $list, $name, $attribs): Adds a contact to a list.
  • getContacts(): Retrieves all contacts.
  • deleteContact($id): Deletes a contact by ID.
  • addList($title, $type, $optin): Creates a new list.
  • getLists(): Retrieves all lists.
  • deleteList($id): Deletes a list by ID.
  • deleteCampaign($id): Deletes a campaign by ID.
  • getCampaignStats($ids, $channel): Retrieves campaign statistics.
  • getCampaignReports($ids, $channel): Retrieves campaign reports.

More Information

For full API reference, visit the Yournotify API Documentation.

License

This SDK is open-source and available under the MIT License.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-02-16

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固