My favorites | Sign in
Project Logo
                
Code license: New BSD License
Show all Featured wiki pages:
KeyConcepts
Feeds:
People details
Project owners:
  mattwilliamsnyc

Best Buy Service Remix

See also: Remix.java

Best Buy Service Remix is a PHP library for making calls to Best Buy's Remix API.

Remix is an open API that gives you access to bestbuy.com's product catalog data.

Best Buy provides several resources for developers, including:

Usage

Note: More detailed explanations of API data, and API client usage can be found in the project wiki, under Key Concepts.

1) Become familiar with the Remix API and apply for an API key at http://remix.bestbuy.com/

2) Download the most recent release of bestbuy-service-twitter and copy the library files to your php include path.

Examples

require_once 'BestBuy/Service/Remix.php';

$apiKey = '12345678'; // Your API key
$remix  = new BestBuy_Service_Remix($apiKey);

// Retrieve a list of stores within 10 miles of a zip code
$result = $remix->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 = $remix->products(array('name=bat*','type=Movie'))->query();

if(!$result->isError())
{
    echo $result;
}
else if(403 != $result->http_code)
{
    // API errors result in an error document with detailed info
    echo $result->toSimpleXml()->message;
}
else
{
    // 403 errors do not contain a full error document, only an h1 message
    echo $result->data;
}

// Retrieve fields from a list of Movies starting with "Bat" in JSON format
$result = $remix->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 = $remix->stores(array('area(10006,10)'))
                ->products(array('sku=8982988'))
                ->sort('distance')
                ->query();

echo $result;








Hosted by Google Code