From feb86fe83d0458a4c9368c79d853652f2ae563bb Mon Sep 17 00:00:00 2001 From: Kim Gerst Date: Tue, 28 Jan 2020 10:56:29 -0600 Subject: [PATCH 1/3] Remove reference to deprecated stores+products query --- source/includes/stores/_index.md.erb | 40 ---------------------------- 1 file changed, 40 deletions(-) diff --git a/source/includes/stores/_index.md.erb b/source/includes/stores/_index.md.erb index 329c2b0..d849b7d 100644 --- a/source/includes/stores/_index.md.erb +++ b/source/includes/stores/_index.md.erb @@ -315,44 +315,4 @@ The Stores API, in conjunction with the Products API, allows you to search store You can look up near real time store availability for single SKUs. You may search either on `postalCode` or based on `storeId`. Results for `postalCode` queries will include all stores within a 250 mile radius, sorted by proximity. - - -###Broad Availability Query - -```shell -curl "https://api.bestbuy.com/v1/stores(area(44.882942,-93.2775,3)&storeType=Express)+products(sku=5038019)?format=json&show=storeId,storeType,city,region,name,products.name,products.sku,products&pageSize=1&apiKey=YourAPIKey" -``` - -```javascript -//Not yet implemented -``` -> Shows Express stores within 3 miles of 44.882942,-93.2775 (Richfield, MN) that carry SKU 5038019 (Insignia 5-Way Stereo Splitter). - -```json-doc -{ - "from": 1, - "to": 1, - "total": 3, - "currentPage": 1, - "totalPages": 3, - "stores": [ - { - "storeId": 8001, - "storeType": "Express Kiosk", - "city": "Richfield", - "region": "MN", - "name": "Best Buy HQ", - "products": [ - { - "name": "Insignia™ - 6\" 5-Way Stereo Splitter - White", - "sku": 5038019 - } - ] - } - ] -} -``` - -If you prefer a broader query, you can use a fuller set of query parameters. Using this wider search, availability in stores is calculated using counts and previous-day sales to determine if the product is likely to be available, might be available or is unlikely to be available. The algorithm errs on the side of caution, and anything that is not available defaults to "not available". - _HINT: The Products API attribute `inStoreAvailability` will tell you if a product is sold in stores but not if it's available at a particular store. Using the In-Store availability queries is equivalent to checking product availability in store._ From 18114004608cea182a4c18ce87dd147066ba0185 Mon Sep 17 00:00:00 2001 From: Kim Gerst Date: Tue, 28 Jan 2020 11:18:09 -0600 Subject: [PATCH 2/3] Remove reference to deprecated stores+products query --- source/includes/stores/_index.md.erb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/source/includes/stores/_index.md.erb b/source/includes/stores/_index.md.erb index d849b7d..d2cddeb 100644 --- a/source/includes/stores/_index.md.erb +++ b/source/includes/stores/_index.md.erb @@ -309,7 +309,7 @@ curl "https://api.bestbuy.com/v1/products/4807511/stores.json?postalCode=55423&a } ``` -The Stores API, in conjunction with the Products API, allows you to search stores for a product and identify if it is available. In-store availability searches will return only those stores that have a given product in stock. Stores not returned do not have that product in stock. You can get near real time availability for specific SKUs based on either a store ID or postal code search. If you prefer to use a broader query - e.g., based on lat/long data or a wider set of product query parameters - your results will be based on estimated data (see below). +The Stores API, in conjunction with the Products API, allows you to search stores for a product and identify if it is available. In-store availability searches will return only those stores that have a given product in stock. Stores not returned do not have that product in stock. You can get near real time availability for specific SKUs based on either a store ID or postal code search. ###SKU Specific Availability From 9b3dfbd9cd5edc2c4d3e6f42eab2a66b6b021a6e Mon Sep 17 00:00:00 2001 From: Kim Gerst Date: Tue, 28 Jan 2020 11:34:28 -0600 Subject: [PATCH 3/3] update sorting example --- source/includes/overview/_sort.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/source/includes/overview/_sort.md b/source/includes/overview/_sort.md index c5b5cb1..a6d6294 100644 --- a/source/includes/overview/_sort.md +++ b/source/includes/overview/_sort.md @@ -1,12 +1,12 @@ ## Sort ```shell -curl 'https://api.bestbuy.com/v1/products(categoryPath.name="All%20Flat-Panel%20TVs")?format=json&show=sku,name,salePrice&sort=salesRankMediumTerm.asc&apiKey=YourAPIKey' +curl 'https://api.bestbuy.com/v1/products(categoryPath.name="All%20Flat-Screen%20TVs")?format=json&show=sku,name,salePrice&sort=salePrice&apiKey=YourAPIKey' ``` ```javascript var bby = require('bestbuy')('YourAPIKey'); -bby.products('categoryPath.name="All Flat-Panel TVs"',{show:'sku,name,salePrice',sort:'salesRankMediumTerm.asc'}).then(function(data){ +bby.products('categoryPath.name="All Flat-Screen TVs"',{show:'sku,name,salePrice',sort:'salePrice.asc'}).then(function(data){ console.log(data); }); ``` @@ -23,18 +23,18 @@ bby.products('categoryPath.name="All Flat-Panel TVs"',{show:'sku,name,salePrice' "queryTime": "0.005", "totalTime": "0.035", "partial": false, - "canonicalUrl": "/v1/products(categoryPath.name=All Flat-Panel TVs)?show=sku,name,salePrice&sort=salesRankMediumTerm&format=json&apiKey=YourAPIKey", + "canonicalUrl": "/v1/products(categoryPath.name=All Flat-Screen TVs)?show=sku,name,salePrice&sort=salePrice&format=json&apiKey=YourAPIKey", "products": [ { - "sku": 3356036, - "name": "Insignia™ - 32\" Class (31-1/2\" Diag.) - LED - 720p - 60Hz - HDTV", - "salePrice": 179.99 + "sku": 6164904, + "name": "Insignia™ - 19\" Class - LED - 720p - HDTV", + "salePrice": 69.99 }, { - "sku": 2563138, - "name": "Insignia™ - 48\" Class (47-5/8\" Diag.) - LED - 1080p - 60Hz - HDTV", - "salePrice": 399.99 - } + "sku": 6260936, + "name": "Insignia™ - 22\" Class - LED - 1080p - HDTV", + "salePrice": 69.99 + }, ``` *Applies to: Products API • Stores API • Categories API*