承接 startupthreads/startupthreads-api-php 相关项目开发

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

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

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 install to 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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2015-05-14