Walmart通过提供邮政编码和编号检索库存/数量和本地商店
问题描述:
我试图使用walmart api构建库存检查应用程序。我开始用的API提供的开源播放https://developer.walmartlabs.com/docs/read/HomeWalmart通过提供邮政编码和编号检索库存/数量和本地商店
如:http://api.walmartlabs.com/v1/items/12417832?apiKey= {的myKey} &格式= XML
是否有人可以帮助我了解如何通过提供的邮政编码和身份证来获取股票/数量和本地存储。
有现有的网路应用程式brickseek和bmsteek等。
答
我一直试图做同样的,据我所知,你不能。
所以,沃尔顿(沃尔玛股票查找应用程序)的开发者共享了一下他的代码
this.walmart.dotcom.query.URL1 = 'http://mobile.walmart.com/m/j?e=1&version=2&service=Browse&method=searchByDepartmentFiltered&p1=';
this.walmart.dotcom.query.URL2 = '&p2=ENTIRESITE&p3=All&p4=RELEVANCE&p5=';
this.walmart.dotcom.query.URL3 = '&p6=50&p7=%5B%5D';
this.walmart.dotcom.upcq = 'http://www.walmart.com/product/mobile/api/upc/';
this.walmart.dotcom.item = 'http://www.walmart.com/product/mobile/api/';
this.walmart.store.query = 'http://search.mobile.walmart.com/search?query=';
this.walmart.store.items = 'http://search.mobile.walmart.com/items';
getWalmartDotcomQuery(query){
return this.http.get(this.walmart.dotcom.query.URL1 + query + this.walmart.dotcom.query.URL2 + '0' + this.walmart.dotcom.query.URL3).map(res => res.json()); } getWalmartDotcomQueryMore(query, more){
return this.http.get(this.walmart.dotcom.query.URL1 + query + this.walmart.dotcom.query.URL2 + more + this.walmart.dotcom.query.URL3).map(res => res.json()); } getWalmartDotcomUPC(upc){
return this.http.get(this.walmart.dotcom.upcq + upc).map(res => res.json()); } getWalmartDotcomID(id){
return this.http.get(this.walmart.dotcom.item + id).map(res => res.json()); }getWalmartStoreQuery(query, offset){
return this.http.get('http://search.mobile.walmart.com/search?query='+query+'&store='+this.storeid+'&size=20&offset='+ offset).map(res => res.json()); }
看起来我们要跨越从他们的官方网站引用它。
来源:
https://www.reddit.com/r/walmart/comments/4hsq7s/questions_about_walmart_api/d2ste4f/
我从来没有使用沃尔玛API之前,但在看文档,我想你将不得不使用[商店定位器API(https://developer.walmartlabs.com/docs/read/Store_Locator_API) – Arti
我已经看到这个,但我不知道如何加入商店定位器API与项目API。谢谢参观 – MarcoP