Code For Integrating BestBuy API Into Your Application
BestBuy api helps you getting every minute detail about the products in BestBuy store.
The prerequisites to make a call to BestBuy api:
1. API key: You can easily get api key from BestBuy developer site.
2. URL to make api call: http://api.remix.bestbuy.com/v1/products
3. List of parameters to pass into the url so that to get the respective information about the store.
Some of the basic parameters are:
- format : json(default value)
- name
- sku
- upc
- customerReviewAverage
- customerReviewCount
and many other, you can get from BestBuy api documentation.
<?php
{
$api_key='********YOUR API KEY********';
$url ='http://api.remix.bestbuy.com/v1/products?show=customerReviewAverage,customerReviewCount,name,sku,upc&format=json&apiKey='.$api_key;
$chnew = curl_init();
curl_setopt($chnew, CURLOPT_CUSTOMREQUEST, 'GET');
curl_setopt( $chnew, CURLOPT_URL, $url );
curl_setopt( $chnew, CURLOPT_RETURNTRANSFER, true );
$response = curl_exec($chnew); // the json output
$response_array=json_decode($response);
echo "<pre>";
print_r($response_array);
echo "<br/>";
curl_close($chnew);
}
?>Using above php curl code you can find BestBuy product details. There are many more method in this api, use it as your requirement.
