troymccabe/bbyopen
Composer 安装命令:
composer require troymccabe/bbyopen
包简介
An adaptation of http://code.google.com/p/bestbuy-service-remix/ for making BBYOpen calls.
README 文档
README
\BestBuy\Service\BBYOpen is a PHP library that supports interaction with
Best Buy's BBYOpen API (https://bbyopen.com/).
Best Buy provides the following resources to API users:
Developer Network: https://bbyopen.com/
API Documentation: https://bbyopen.com/bbyopen-apis-overview
Discussion Forums: https://bbyopen.com/forum
DISCLAIMER
Matt Williams, the author, is neither affiliated with, nor endorsed by, Best Buy
Troy McCabe is affiliated with Best Buy
SUPPORT AND BUG REPORTS
Bug reports, as well as feature requests, may be submitted at:
https://bitbucket.org/troymccabe/web-bbyopen/issues/
Alternatively, you may email the developer directly: troy.mccabe@geeksquad.com
GETTING STARTED
:::php
$apiKey = '12345678'; // Your API key
$bbyOpen = new \BestBuy\Service\BBYOpen\Client($apiKey);
// Retrieve a list of stores within 10 miles of a zip code
$result = $bbyOpen->stores(array('area(10006,10)'))->query();
// Result objects may be implicitly cast as strings
echo $result;
// Retrieve a list of Movies containing the text "Bat"
$result = $bbyOpen->products(array('name=bat*', 'type=Movie'))->query();
echo $result;
// Retrieve fields from a list of Movies starting with "Bat" in JSON format
$result = $bbyOpen->products(array('type=Movie', 'name=bat*'))
->show(array('name','regularPrice','url', 'sku'))
->format('json')
->query();
echo $result;
// Check for store availability of a Playstation 3 in a given area
$result = $bbyOpen->stores(array('area(10006,10)'))
->products(array('sku=8982988'))
->sort('distance')
->query();
echo $result;
To override the root URI, you can define BBYOPEN_URI, which will replace BBYOpen::API_BASE in the built URL.
DOCUMENTATION
Documentation was generated using PhpDocumentor [http://www.phpdoc.org/].
Documentation may be regenerated as follows (from the base directory):
phpdoc
TESTS
Tests are written for PHPUnit [https://github.com/sebastianbergmann/phpunit/]
Tests can be run as follows (from the base directory):
phpunit
统计信息
- 总下载量: 5.05k
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: BSD-3-Clause-Clear
- 更新时间: 2013-03-12