How can I list which stores have an item in stock? - best-buy-api

I'm searching for a particular item that is listed as available for in-store pickup only, but not in my area.
I'd like to use the API to find out which stores do have that item in stock so I can phone a friend that lives in one of those areas and get them to pick it up.
So... How can I list the stores that have a particular item in stock?
Answer
The geographic center of the United States is 39°50' (39.8333), -98°35' (-98.5833)
The width United States is approximately 3,000 miles.
So if we search a radius of 2000 miles in any direction from that point we get:
http://api.remix.bestbuy.com
/v1/stores(area(39.8333,-98.5833,2000mi))
+products(sku=YOUR_SKU_ID)
?format=json
&pageSize=100
&page=1
&show=storeId,storeType,city,region,name,products.name,products.sku,products
&apiKey=YOUR_API_KEY
http://api.remix.bestbuy.com/v1/stores(area(39.8333,-98.5833,2000mi))+products(sku=6461052)?format=json&pageSize=100&page=1&show=storeId,storeType,city,region,name,products.name,products.sku,products&apiKey=YOUR_API_KEY
And you'll be surprised that while 1419 stores have Black Ink'd Skullcandy Earbuds in stock the day before Christmas, 0 of them have the Marth Amiibo, and 67 have the Star Fox Amiibo... who knew?

The API does provide a way to check for product availability in specific stores. Here is an example query (you need to substitute in your own apiKey) that uses coordinates and a radius within which to search:
http://api.remix.bestbuy.com/v1/stores(area(44.882942,-93.2775,10mi))+products(sku=6461052)?apiKey=yourApiKey&format=json&show=storeId,storeType,city,region,name,products.name,products.sku,products
There is documentation about this feature here:
https://developer.bestbuy.com/documentation/stores-api#documentation/stores-api-in-store-availability
You will find in the documentation that you can also search for availability at a specific store, or use a postal code. But I think using the coordinates may fit the case described in your question best.

Related

When Raw Material type is stockable, it's not available in manufacture order

It takes me hours but I still cannot find out why.
I have make MO for product A
A(manufacture in WH-A)
|----1 pcs of Part 1(stockable, 100pcs on hand in WH-A)
|----1 pcs of Part 2(stockable, 100pcs on hand in WH-A)
But when I click check availability, it always show quantity available is none.
I noticed that the supply method for raw material is Advanced: Apply Procurement Rules . and the explanation tells me that it by default check stock but I can also apply procuments, but that's not what I want, I just want it to do by default.
Why? I indeed have enough products in WH-A.
Thank you very much!
It's ODOO 10.

How can I query Wikidata API to get details of all the Korean films?

If possible, i want to return the results in Json or XML format. Is there any ways to do so? Earlier I did it using freebase.com but it is now deprecated. Please help.
This query would look a lot like the one to get the list of all films on Wikidata but adding another filter:
instead of http://wdq.wmflabs.org/api?q=claim[31:11424] (return all the entities marked as instances of film), you would do
http://wdq.wmflabs.org/api?q=claimCLAIM[31:11424] AND CLAIM[495:884] (return all the entities marked as instances of film and South Korea (Q884) as country of origin (P495))
http://wdq.wmflabs.org/api?q=claimCLAIM[31:11424] AND CLAIM[495:423] (the same for North Korea (Q423))
Then to parse the results and get the entities data, it would be the same as for the list of all the films
Remarques:
you will probably need to encode those URLs to get something that looks like: http://wdq.wmflabs.org/api?q=CLAIM%5B31%3A11424%5D%20AND%20CLAIM%5B495%3A884%5D
here is the full API documentation. Notice that this is an experimental API, which might be replaced in the coming year
The overview on Wikipedia may be more complete than Wikidata, as you've noticed yourself also. However, I could only find overviews per year, such as on https://en.wikipedia.org/wiki/List_of_South_Korean_films_of_2015.
To get a list of titles from that page, you would first retreive the raw wikicode of the page: https://en.wikipedia.org/w/index.php?action=raw&title=List_of_South_Korean_films_of_2015, and then run a regular expression such as /\{lang\|[^\|]+\|([^\}]+)/g on the code.
This returns a list of 149 titles.

Geomapping using Qlikview BI tool

I have a dataset with country names (to and from) which is similar to travel starting country and the destination country.
For example: if the travel is between India to Australia then the country origin will be India and the destination will be Australia.
I have collected the latitude and longitude for both origin and destination place.
Now I want to plot the lat and log for origin and destination country using Qlikview tool.
I'm using Qlikview11 Personal edition.
Two ways to achieve this case:
1. Using GeoQlik extension
Install GeoQlik extension in Qlikview Click to Install GeoQlik
Open GeoQlik extension in Webmode and choose Line Graph.
Add the dimensions as Country Origin and Country Destination
Add the lat and log positions as in below image.
Similarly you can do it for Country Destination.
You can also adjust the line width and color properties also.
Demerit: In GeoQlik trial version, you cant able to save the visualizations.(need to be licensed version to enjoy all the features)
2. Using Line Graph
Ref from : http://qvdesign.wordpress.com/2012/06/22/new-qlikview-chart-type-dynamic-network-flow-charts/
They used static image of world map as background. They created a line graph with X and Y coordinates running axes from 0 to 200 and set as transparent.
Here the fuzzy thing is I don't know how they calculated lat and long positions!
You can use the Qlikview Mapping Extension that installs with the product. See the "Extension Examples.qvw" in the installed examples. Note the instruction on the first sheet that directs you to complete the installation by launching the .qar file. In the Extension Examples is a sample showing how to plot lines and points on a map.

Steam market currency and XML format

Im trying to get an item page on market in certain currency, tried to add
Accept-Language: ru-RU\r\n
and
Accept-Language: ru-RU, ru\r\n
and
Accept-Language: ru, ru-RU;q=0.8\r\n
to header but steam ignores it and always gives a page with mixed rubles, euros and dollars.
Also, how can i get a page in xml format? ?format=xml and ?xml=1 dont work, tried with application/xml and */*
If someone still needs this:
http://steamcommunity.com/market/search/render/?start=0&count=10&l=english&currency=5&q=&category_730_ItemSet%5B%5D=any&category_730_TournamentTeam%5B%5D=any&category_730_Weapon%5B%5D=tag_weapon_ak47&category_730_Exterior%5B%5D=tag_WearCategory0&category_730_Quality%5B%5D=tag_strange&appid=730
l param (Language): english, russian, french, etc.
count is how much results to display
start is starting result (start=10&count=10 is 2nd page with 10 results)
currency: 5 = ruble, 3 = USD. There are many others.
http://steamcommunity.com/market/listings/730/StatTrak%E2%84%A2%20AK-47%20%7C%20Blue%20Laminate%20%28Factory%20New%29/render?start=0&count=5&currency=5&language=english
Recently Valve added market prices on inventory page when inspecting an item. The price is loaded through AJAX, and through inspecting network requests I found this:
http://steamcommunity.com/market/priceoverview/?country=US&currency=3&appid=730&market_hash_name=AWP%20|%20Electric%20Hive%20(Factory%20New)
You can force currency with this (currency 3 is EUR), returns lowest price on market and median price, JSON format.
Sellers will always list items for sale in the native currency of
their Steam Wallet, and buyers will always see Community Market prices
expressed in the native currency of their Steam Wallet. For items
listed for sale in a different currency than the buyer's Steam Wallet
currency, we apply an exchange rate which we update daily.
- Community Market FAQ
Meaning, if you are looking at the market from a browser you are logged in on and you have funds in your wallet that are not in Rubles, you won't see Rubles.
You can, however, get around this. If you log out of the market and visit your URL, there are two parameters you can pass for force language and region changes.
For example, using the ever popular Supply Crate Key: http://steamcommunity.com/market/listings/440/Mann%20Co.%20Supply%20Crate%20Key?l=russian&cc=ru
Notice the l and cc parameters. The l is setting the language to Russian and the cc is setting the region to Russia.
Now, this doesn't appear to work on the entire page. The graph showing historical trends still appears to be in USD, even though the surrounding text is in Russian.
But, the individual listings of items did, in fact, change currencies.

Mediawiki API: Get image from articles in specific category

Without much success, I've been trying to retrieve images (and extracts) from all posts in a certain category.
Here's a query to get the images from the main page, but I haven't found a query for specific categories.
api.php?action=query&prop=images&titles=Main%20Page
Using search seemed more promising, but still it's not what I'm looking for.
api.php?action=query&list=search&format=jsonfm&srsearch=incategory:Marine_mammals
The second query could've been a good starting point if it provided page IDs.
What you want is to use the categorymembers generator, by adding &generator=categorymembers&gcmtitle=Category%3AMarine_mammals in place of &titles. Since I discovered generators I barely remember using the API for anything else. I'd also recommend sticking to mainspace. So for example,
https://en.wikipedia.org/w/api.php?action=query&prop=images&format=json&imlimit=10&generator=categorymembers&gcmtitle=Category%3AMarine_mammals&gcmnamespace=0&gcmlimit=50
Gives:
{"query-continue":{"images":{"imcontinue":"60257|Ursus_maritimus_4_1996-08-04.jpg"}},"query":{"pages":{"149269":{"pageid":149269,"ns":0,"title":"Blubber"},"19289045":{"pageid":19289045,"ns":0,"title":"Instituto Via Delphi"},"2178272":{"pageid":2178272,"ns":0,"title":"List of marine mammals of Australia"},"60257":{"pageid":60257,"ns":0,"title":"Marine mammal","images":[{"ns":6,"title":"File:Desmostylus2DB.jpg"},{"ns":6,"title":"File:Estuary-mouth.jpg"},{"ns":6,"title":"File:FL fig04.jpg"},{"ns":6,"title":"File:Humpback Whale underwater shot.jpg"},{"ns":6,"title":"File:Hydrurga leptonyx edit1.jpg"},{"ns":6,"title":"File:Maldivesfish2.jpg"},{"ns":6,"title":"File:Oceanic whale pump - journal.pone.0013255.g001.tiff"},{"ns":6,"title":"File:PikiWiki Israel 15217 Dolphin.JPG"},{"ns":6,"title":"File:Sea lion family.JPG"},{"ns":6,"title":"File:Sea otter cropped.jpg"}]},"36425597":{"pageid":36425597,"ns":0,"title":"Marine mammals as food"},"3703749":{"pageid":3703749,"ns":0,"title":"Marine otter"},"644379":{"pageid":644379,"ns":0,"title":"North Atlantic Marine Mammal Commission"},"1336536":{"pageid":1336536,"ns":0,"title":"Sea mink"},"567471":{"pageid":567471,"ns":0,"title":"Sea otter"},"2764345":{"pageid":2764345,"ns":0,"title":"United States Navy Marine Mammal Program"}}}}