voradius/api 问题修复 & 功能扩展

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

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

voradius/api

最新稳定版本:v0.1

Composer 安装命令:

composer require voradius/api

包简介

Voradius API service

README 文档

README

Build Status Latest Stable Version Dependency Code Climate Scrutinizer Code Quality

Voradius API

This library is aimed at wrapping the Voradius API in a simple package.

Table Of Content

  1. Requirements
  2. Installation
  3. General Example

Requirements

This library uses PHP 5.4+.

To use the API, you have to request an access key from Voradius. For every request, you will have to provide the Access Key.

Installation

It is recommended that you install the PHP API Wrapper library through composer. To do so, add the following lines to your composer.json file.

{
    "require": {
        "Voradius/api": "dev-master"
    }
}

General example

All Entity classes need a Client object supplied on creating an object, with both the API Key and Environment supplied, as below.

Valid environments for external usage are:

  • SANDBOX (for testing)
  • LIVE
$client = new Voradius\Client('API_KEY_HERE', Voradius\Client::SANDBOX]);
$productApi = new Entity\Product($client);
````

After creating the entity object it is possible to use the several methods provided in this entity, e.g.:

````
$product = $productApi->getById(1000);
````

All entities check for valid input and build the request to the Voradius API for you. Errors are thrown by the Guzzle library, else the content is just returned directly to you. In most cases this will be a JSON formatted string. We don't manipulate the data on return, giving you all the freedom to perform caching and/or manipulate the data before usage.

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: Unknown
  • 更新时间: 2015-07-20