torreycommerce/acenda-php-sdk
最新稳定版本:1.0.14
Composer 安装命令:
composer require torreycommerce/acenda-php-sdk
包简介
Acenda PHP SDK
关键字:
README 文档
README
Acenda website: Acenda
Homepage: Git repository
Author: Acenda development Team
Description
The Acenda PHP Client makes it very easy to manage the authentication
and query to any store you would have access to.
Note:
- This client is in Alpha and doesn't have all the features needed *
Install
Composer
Installation through composer is the easiest.
Just add these lines to your file composer.json:
{
"require": {
"torreycommerce/acenda-php-sdk": "0.3.*"
}
}
How to use it
Usage should be simple enough for you to use it right away.
After instantiation, access all the API of your store:
<?php // Autoloading of your dependecies. include('vendors/autoload.php'); try { $acenda = new Acenda\Client( _CLIENT_ID_, _CLIENT_SECRET_, _STORE_NAME_); $acenda->get('/order', [ 'limit' => 1, 'attributes' => 'id' ]); /** ** Response example ** object(Acenda\Response)#16 (2) { ** ["code"]=> ** int(200) ** ["body"]=> ** object(stdClass)#14 (4) { ** ["code"]=> ** int(200) ** ["status"]=> ** string(2) "OK" ** ["num_total"]=> ** int(1) ** ["result"]=> ** array(1) { ** [0]=> ** object(stdClass)#15 (1) { ** ["id"]=> ** int(3398553) ** } ** } ** } ** } **/ }catch (Exception $e){ /* ** Two types of exceptions are thrown, ** AcendaException which are Acenda HTTP request related, ** And Exception which are usage and PHP related. */ var_dump($e); }
Examples:
File upload
$acenda->post('/import/upload', [
'model'=>'variant'
],['/tmp/tempfile.csv']);
Contributing
Acenda highly encourages sending in pull requests.
When submitting a pull request please:
- Make sure your code follows the coding conventions.
- Please use soft tabs (four spaces) instead of hard tabs.
- Make sure you add appropriate test coverage for your changes.
Support
Please report bugs on the issue manager of the project on GitHub. A forum will soon be open to answer questions.
统计信息
- 总下载量: 17.82k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 2
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-03-04