2015-02-11 61 views
0

我有一個BestBuy產品API的問題。我試圖搜索「samsung galaxy s3」之類的東西。我已經在我的php頁面中使用了file_get_contents。我的電話類似於:http://api.remix.bestbuy.com/v1/products((search=samsung&search=galaxy&search=s3)&salePrice> VALUE)?show = name,salePrice & format = xml & apiKey = MYAPIKEY;百思買 - 產品API問題

這將不會返回任何內容。我如何搜索手機?

+0

我也試過用name = rawurlencode(STRINGTOSEARCH),我想念categoryPath.id,因爲我沒有在任何地方找到它 – 2015-02-11 14:34:31

回答

0

這取決於你有多想你的答案。如果您正在尋找您的三星Galaxy S III滿足百思買用!? http://api.remix.bestbuy.com/v1/products(name=%22Galaxy%20S%20III *%22 & categoryPath.id = abcat0800000 & categoryPath.id = abcat0811002)apiKey = YourAPIKey &秀= SKU,名稱,salePrice

如果你想包括市場三星Galaxy S III戰士用!? http://api.remix.bestbuy.com/v1/products(name=%22Galaxy%20S%20III%22 & categoryPath.id = abcat0800000 & categoryPath.id = abcat0811002 &市場=)apiKey = YourAPIKey &秀= SKU,姓名,salePrice,市場& pageSize = 100

對於查詢,我用通配符搜索Galaxy S III的名稱字段。然後我將這些結果過濾爲手機。第二個查詢打開搜索以包括市場項目。