schemaio / schema-php-client

PHP的Schema API客户端

dev-master 2016-08-01 17:37 UTC

This package is not auto-updated.

Last update: 2024-09-14 19:04:15 UTC


README

使用Schema构建和扩展电子商务。在https://schema.io创建免费账户

示例

require_once("/path/to/schema-php-client/lib/Schema.php");

$client = new Schema\Client('<client-id>', '<client-key>');

$products = $client->get('/categories/shoes/products', array(
	'color' => 'blue'
));

print_r($products);

或使用Composer

composer.json

"require": {
	"schemaio/schema-php-client" : "dev-master"
},
 "repositories": [
	{
		"type" : "vcs",
		"url"  : "git@github.com:schemaio/schema-php-client.git"
	}
]

然后运行composer update下载并安装库

require __DIR__ . '/vendor/autoload.php';

$client = new Schema\Client('<client-id>', '<client-key>');

$products = $client->get('/categories/shoes/products', array(
	'color' => 'blue'
));

print_r($products);

文档

有关更多API文档和使用示例,请参阅http://schema.io/docs/clients#php

贡献

欢迎提交拉取请求

许可

MIT