Skip to content

Commit 0ef9a15

Browse files
authored
Remove reference to deprecated stores+products query (#95)
* Remove reference to deprecated stores+products query * Remove reference to deprecated stores+products query * update sorting example
1 parent 1544e72 commit 0ef9a15

File tree

2 files changed

+11
-51
lines changed

2 files changed

+11
-51
lines changed

source/includes/overview/_sort.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
## Sort
22

33
```shell
4-
curl 'https://api.bestbuy.com/v1/products(categoryPath.name="All%20Flat-Panel%20TVs")?format=json&show=sku,name,salePrice&sort=salesRankMediumTerm.asc&apiKey=YourAPIKey'
4+
curl 'https://api.bestbuy.com/v1/products(categoryPath.name="All%20Flat-Screen%20TVs")?format=json&show=sku,name,salePrice&sort=salePrice&apiKey=YourAPIKey'
55
```
66

77
```javascript
88
var bby = require('bestbuy')('YourAPIKey');
9-
bby.products('categoryPath.name="All Flat-Panel TVs"',{show:'sku,name,salePrice',sort:'salesRankMediumTerm.asc'}).then(function(data){
9+
bby.products('categoryPath.name="All Flat-Screen TVs"',{show:'sku,name,salePrice',sort:'salePrice.asc'}).then(function(data){
1010
console.log(data);
1111
});
1212
```
@@ -23,18 +23,18 @@ bby.products('categoryPath.name="All Flat-Panel TVs"',{show:'sku,name,salePrice'
2323
"queryTime": "0.005",
2424
"totalTime": "0.035",
2525
"partial": false,
26-
"canonicalUrl": "/v1/products(categoryPath.name=All Flat-Panel TVs)?show=sku,name,salePrice&sort=salesRankMediumTerm&format=json&apiKey=YourAPIKey",
26+
"canonicalUrl": "/v1/products(categoryPath.name=All Flat-Screen TVs)?show=sku,name,salePrice&sort=salePrice&format=json&apiKey=YourAPIKey",
2727
"products": [
2828
{
29-
"sku": 3356036,
30-
"name": "Insignia™ - 32\" Class (31-1/2\" Diag.) - LED - 720p - 60Hz - HDTV",
31-
"salePrice": 179.99
29+
"sku": 6164904,
30+
"name": "Insignia™ - 19\" Class - LED - 720p - HDTV",
31+
"salePrice": 69.99
3232
},
3333
{
34-
"sku": 2563138,
35-
"name": "Insignia™ - 48\" Class (47-5/8\" Diag.) - LED - 1080p - 60Hz - HDTV",
36-
"salePrice": 399.99
37-
}
34+
"sku": 6260936,
35+
"name": "Insignia™ - 22\" Class - LED - 1080p - HDTV",
36+
"salePrice": 69.99
37+
},
3838
```
3939

4040
*Applies to: Products API • Stores API • Categories API*

source/includes/stores/_index.md.erb

Lines changed: 1 addition & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -309,50 +309,10 @@ curl "https://api.bestbuy.com/v1/products/4807511/stores.json?postalCode=55423&a
309309
}
310310
```
311311

312-
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).
312+
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.
313313

314314
###SKU Specific Availability
315315

316316
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.
317317

318-
319-
320-
###Broad Availability Query
321-
322-
```shell
323-
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"
324-
```
325-
326-
```javascript
327-
//Not yet implemented
328-
```
329-
> Shows Express stores within 3 miles of 44.882942,-93.2775 (Richfield, MN) that carry SKU 5038019 (Insignia 5-Way Stereo Splitter).
330-
331-
```json-doc
332-
{
333-
"from": 1,
334-
"to": 1,
335-
"total": 3,
336-
"currentPage": 1,
337-
"totalPages": 3,
338-
"stores": [
339-
{
340-
"storeId": 8001,
341-
"storeType": "Express Kiosk",
342-
"city": "Richfield",
343-
"region": "MN",
344-
"name": "Best Buy HQ",
345-
"products": [
346-
{
347-
"name": "Insignia™ - 6\" 5-Way Stereo Splitter - White",
348-
"sku": 5038019
349-
}
350-
]
351-
}
352-
]
353-
}
354-
```
355-
356-
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".
357-
358318
_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._

0 commit comments

Comments
 (0)