承接 smarkio/smarkio-revisor-api-client 相关项目开发

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

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

smarkio/smarkio-revisor-api-client

最新稳定版本:1.1.0

Composer 安装命令:

composer require smarkio/smarkio-revisor-api-client

包简介

Accelerator to communicate with the Smarkio Feedback API

README 文档

README

An accelerator to communicate with © Smarkio Feedback API

Installation and usage with Composer

Add the following to your composer.json file in order to fetch the latest stable version of the project:

{
    "require": {
        "smarkio/smarkio-revisor-api-client": "*"
    }
}

Then, in order to use the accelerator on your own PHP file, add the following:

require '[COMPOSER_VENDOR_PATH]/autoload.php';

Contents

  • src/Smarkio/Revisor - Code to interact with the Smarkio Feedback API.
  • examples/ - Some examples on how to use this accelerator.

Before you start

You need to obtain one API token to use the API. This token enables the API to recognize the Revisor trying to send requests.

Usage

Send Lead Feedback

$api_token = 'YOUR API TOKEN HERE';
$lead_id = '123456789';
$status = 'converted';

// create Feedback based on the leadId in LeadOffice
$feedback = Feedback::createWithLeadId($api_token, $lead_id, $status);

// set Lead's optional parameters
$feedback->setInstantAt(date('Y-m-d H:i:s'));
$feedback->setDescription('Additional information about what happened');

// add Lead's optional extra fields
$feedback->addExtraFields(array('field_1'=>'value_1','field_2'=>'value_2'));

// send the Feedback
$response = $feedback->send();

Send Lead Feedback without Lead ID

$api_token = 'YOUR API TOKEN HERE';
$external_id = '123456789';
$supplier_id = '1';
$status = 'converted';

// create Feedback with mandatory parameters
$feedback = Feedback::createWithSupplierExternalId($api_token, $supplier_id, $external_id, $status);

// send the Feedback
$response = $feedback->send();

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-01-06