commercesignals/csapi-php 问题修复 & 功能扩展

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

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

commercesignals/csapi-php

Composer 安装命令:

composer require commercesignals/csapi-php

包简介

API client library to work with the Commerce Signals platform.

关键字:

README 文档

README

Databridge by Commerce Signals

Build Status License

Library to interface with the Commerce Signals platform.

Installing with Composer

composer require commercesignals/csapi-php

Usage

Authorize your client

const CERT_FILE_NAME = 'my-api-key-private-cert.pem';
const API_KEY = '0b70012a-5a7a-2b90-815a-aa73a7f8001a'; // My API Key
const API_BASE = 'https://api.commercesignals.com/';

$api = new CommerceSignals\API(API_BASE, [
  'apiKey' => API_KEY,
  'cert' => file_get_contents(__DIR__ . '/' . CERT_FILE_NAME)
]);

The API class

The main API class is used to build the API request to issue.

The methods of the API call can be chained to create the segments of the request you are making. Each chained method has an optional $id paramater that can be passed to request a specific resource from the segment part. The final method in the call determins the type of HTTP request being made and has an optional $payload paramater that will be used as the request BODY.

get() => GET request
update() => PATCH request
save() => POST or PUT (depending on if the payload BODY has an id set or not)
Example
  $api->signals('0a000337-574f-223e-8156-4f3a98e707a1')
    ->requests('0a00017c-5aac-1195-82ba-ae6ea3fa000a')
    ->results()
    ->get();
HTTP Request

GET https://api.commercesignals.com/rest/v1/signals/0a00...07a1/requests/0a00...a000a/results

Calling Endpoint Examples

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: BSD-3-Clause
  • 更新时间: 2017-03-17

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固