roichamp/php-client 问题修复 & 功能扩展

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

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

roichamp/php-client

Composer 安装命令:

composer require roichamp/php-client

包简介

A PHP wrapper for the RoiChamp REST API

README 文档

README

A PHP wrapper for the RoiChamp REST API. Easily interact with the RoiChamp REST API securely using this library.

Installation

composer require roichamp/php-client

Getting started

To get your API key contact us on office@roichamp.com

Client class

$roichamp = new \RoiChamp\Client([
    'token' => 'API_KEY'
]);

Client methods

Subscriber Upsert

$roichamp->upsertSubscriber([
    'email' => 'office@roichamp.com',
    'first_name' => 'Roi',
    'last_name' => 'Champ',
    'phone' => '+381123123',
    'metaData' => [
        'source' => 'google'
    ],
])

Arguments

Params Type Required Description
email string yes Subscriber email address.
first_name string no Subscriber first name.
last_name string no Subscriber last name.
phone string no Subscriber phone number.
metaData array no Key-value custom meta data.

Subscriber Unsubscribe

$roichamp->unsubscribe('office@roichamp.com')

Arguments

Params Type Required Description
email string yes Subscriber email address.

Category Upsert

$roichamp->upsertProduct([
    'identity' => '42141',
    'title' => 'Product title',
    'image' => '...',
    'permalink' => '...',
    'suggest' => 1,
    'metaData' => [
        'foo' => 'bar'
    ],
])

Product Upsert

$roichamp->upsertProduct([
    'identity' => '14214',
    'title' => 'Product title',
    'price' => 199,
    'price_promo' => 99,
    'currency' => 'USD',
    'image' => '...',
    'permalink' => '...',
    'content' => 'Product description',
    'suggest' => 1,
    'categoryIdentities' => ['42141'],
    'metaData' => [
        'foo' => 'bar'
    ],
])

Send transactional email

$roichamp->sendEmail([
    'identity' => 'reset_password',
    'to' => 'office@roichamp.com',
    'params' => [
        'reset_url' => '...',
    ],
])

Arguments

Params Type Required Description
identity string yes Email identity.
email string yes Subscriber email address.
params array no Key-value custom email params.

Release History

  • 2021-04-26 - 1.0.0 - Pre-release.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2021-04-26

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固