startupthreads/startupthreads-api-php
Composer 安装命令:
composer require startupthreads/startupthreads-api-php
包简介
Client library for the StartupThreads API.
README 文档
README
Very simple and easy StartupThreads API wrapper, for PHP.
Complex wrappers are for noobs. This lets you access the StartupThreads API using the docs as directly as possible.
Requires PHP 5.3.
Installation
You can install the startupthreads-api-php using Composer. Just add the following to your composer.json:
{
"require": {
"startupthreads/startupthreads-api-php": "dev-master"
}
}
You will then need to:
- run
composer installto get these dependencies added to your vendor directory - add the Composer autoloader to your application with this line:
require("vendor/autoload.php")
Examples
###List items (/items.json method)
$st = new StartupThreads('api-token-here'); print_r($st->get('items.json'));
###Create an Inventory Shipment (/inventory_shipments method)
$st = new StartupThreads('api-token-here'); $result = $st->create('/inventory_shipments', array( 'inventory_shipment' => array( payment_method' => "account_balance", 'test_mode' => 1 'line_items' => array( array ( "item_id" => "dfsea4rs", "size" => "MS", "quantity" => 3 ) ), 'address' => array ( "name" => "Frank Denbow", "street1" => "902 Broadway", "city" => "New York", "state" => "New York", "zip" => "10010", "country" => "US" ) ); )); print_r($result);
统计信息
- 总下载量: 2.72k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2015-05-14