承接 dwijonarko/php-kirimemail 相关项目开发

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

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

dwijonarko/php-kirimemail

Composer 安装命令:

composer require dwijonarko/php-kirimemail

包简介

PHP helpers to comunicate with kirimemail api marketing easily

README 文档

README

The unofficial PHP client library for the Kirim.Email Marketing API. Official documentation for Kirim.Email Marketing api is here

Instalation

Option 1: Install via Packagist

composer require --dev dwijonarko/php-kirimemail:dev-main

Or add the following to composer.json

{
  "require": {
    "dwijonarko/php-kirimemail": "dev-main"
  }
}

Option 2: Install Manually

Clone the repo

git clone git@github.com:dwijonarko/phpkirimemail.git

In the client library project root, install all dependencies

composer install

Manually include vendor/autoload.php in your implementation

Quick Start

<?php
require_once('vendor/autoload.php');
use Dwijonarko\PHPKirimemail\Lists;
$config= [
    'username'=>'YOURUSERNAME',
    'api_token'=>'YOUR KIRIM EMAIL API TOKEN'
];

$lists = new Lists($config);
$result = $lists->getAll();
var_dump($result);

Functions

List

  1. Get All Lists
$lists = new Lists($config);
$result = $lists->getAll();
  1. Get List By Id
$lists = new Lists($config);
$result = $lists->getById($listID);
  1. Create List
$lists = new Lists($config);
$list_name = 'List Name';
$result = $lists->create($list_name);
  1. Update List
$lists = new Lists($config);
$list_name = "Update Name";
$result = $lists->update($list_id,$list_name);
  1. Delete List
$lists = new Lists($config);
$result = $lists->delete($list_id);

Subscriber

  1. Get All Subscriber
$subscribers = new Subscribers($config);
$result = $subscribers->getAll();
  1. Get Subscriber By Id
$subscribers = new Subscribers($config);
$result = $subscribers->getById($id);
  1. Get Subscriber By Email
$subscribers = new Subscribers($config);
$result = $subscribers->getByEmail($subscriber_email);
  1. Create Subscriber
$subscribers = new Subscribers($config);
$subscriber_params = [
	'email'  =>  'email@example.com',
	'full_name'  =>  'Full Name',
	'lists'  => $list_id,
	'status'  =>  'subscribed',
	'tags'  =>  'api,php',
	'fields'  => [
		'phone'  =>  '081234567890',
		'address'  =>  'Jl. Jalan'
	]]
$result = $subscribers->create($subscriber_params);
  1. Update Subscriber By Id
$subscribers = new Subscribers($config);
$subscriber_params = [
	'email'  =>  'email@example.com',
	'full_name'  =>  'Full Name',
	'lists'  => $list_id,
	'status'  =>  'subscribed',
	'tags'  =>  'api,php',
	'fields'  => [
		'phone'  =>  '081234567890',
		'address'  =>  'Jl. Jalan'
	]]
$result = $subscribers->update($subscriber_id,$subscriber_params);
  1. Update Subscriber By Email
$subscribers = new Subscribers($config);
$subscriber_params = [
	'email'  =>  'email@example.com',
	'full_name'  =>  'Full Name',
	'lists'  => $list_id,
	'status'  =>  'subscribed',
	'tags'  =>  'api,php',
	'fields'  => [
		'phone'  =>  '081234567890',
		'address'  =>  'Jl. Jalan'
	]]
$result = $subscribers->updateByEmail($subscriber_email,$subscriber_params);
  1. Delete Subscriber
$subscribers = new Subscribers($config);
$result = $subscribers->getAll();

Subscriber Field

  1. Get All Subscriber Field
$subscriber_field = new SubscriberFields($config);
$result = $subscriber_field->getAll();
  1. Get Subscriber Field By Id
$subscriber_field = new SubscriberFields($config);
$result = $subscriber_field->getById($subsciber_field_id);
  1. Create Subscriber Field
$subscriber_field = new SubscriberFields($config);
$subscriber_field_param = [
	'name' => 'Address',
    'type' => 'textarea',
];
$result = $subscriber_field->create($subscriber_field_param);
  1. Update Subscriber Field
$subscriber_field = new SubscriberFields($config);
$subscriber_field_param = [
	'name' => 'Address',
    'type' => 'textarea',
];
$result = $subscriber_field->updpate($id,$subscriber_field_param);
  1. Delete Subscriber Field
$subscriber_field = new SubscriberFields($config);
$result = $subscriber_field->delete($subscriber_field_id);

Form

  1. Get All Form
$form = new Forms($config);
$result = $form->getAll();
  1. Get Form By Id
$form = new Forms($config);
$result = $form->getById($form_id);
  1. Get Form By Url
$form = new Forms($config);
$parse_url = parse_url($url, PHP_URL_PATH);
if (!empty($parse_url)) {
	$path = explode('/', $parse_url);
    $form_url = end($path);
}else{
	$form_url = $url;
}
$result = $form->getByUrl($form_url);

Landing Page

  1. Get All Landing Page
$landing = new LandingPages($config);
$result = $landing->getAll();
  1. Get Landing Page By Id
$landing = new LandingPages($config);
$result = $landing->getById($form_id);
  1. Get Landing Page By Url
$landing = new LandingPages($config);
$parse_url = parse_url($url, PHP_URL_PATH);
if (!empty($parse_url)) {
	$path = explode('/', $parse_url);
    $form_url = end($path);
}else{
	$form_url = $url;
}
$result = $landing->getByUrl($form_url);

Broadcast

  1. Get All Broadcast
$broadcast = new Broadcasts($config);
$result = $broadcast->getAll();
  1. Get Broadcast By GUID
$broadcast = new Broadcasts($config);
$result = $broadcast->getByGuid($broadcast_guid);
  1. Create Broadcast Note: The message contains the subject and content. You can send a maximum of 3 messages.
$broadcast = new Broadcasts($config);
$param[
	'title'=>'Title',
	'sender'=>'Email Sender',
	'messages[0][subject]'=>'Email Subject',
	'messages[0]['content]'=>'Email content, ', //disallow css and js, read official docs for detail
	'send_at'=>'2018-12-30 00:00:00',
	'list'=>1
	];
$result = $broadcast->create($params);
  1. Edit Broadcast Note: If the current broadcast is of type SPLIT, then you need to add all messages. If you add only one message, then the type will be SINGLE. The message sent must always be equal to the current Broadcast Message count.
$broadcast = new Broadcasts($config);
$param[
	'title'=>'Title',
	'sender'=>'Email Sender',
	'messages[0][subject]'=>'Email Subject',
	'messages[0]['content]'=>'Email content, ', //disallow css and js, read official docs for detail
	];
$result = $broadcast->update($broadcast_guid,$params);
  1. Delete Broadcast
$broadcast = new Broadcasts($config);
$result = $broadcast->update($broadcast_guid);

dwijonarko/php-kirimemail 适用场景与选型建议

dwijonarko/php-kirimemail 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 6 次下载、GitHub Stars 达 0, 最近一次更新时间为 2022 年 11 月 20 日, 在 PHP 生态内属于活跃度较高的组件。

我们在过去多个企业项目中使用过 dwijonarko/php-kirimemail 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dwijonarko/php-kirimemail 我们能提供哪些服务?
定制开发 / 二次开发

基于 dwijonarko/php-kirimemail 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2022-11-20