我使用Google Maps Place API
限於城市研究,因此我得到的城市,州和國家加上conditions
和forecast10day Wunderground API
。Wunderground API-國家/州/城市組合問題
似乎有時我已經建立了Wunderground API
端點問題。
當我在短短一個國家提供一個城市,我有這個端點:
http://api.wunderground.com/api/ {}鍵/conditions/q/IT/Milan.json
和它的工作原理像一個魅力。
當我知道我在尋找的城市可在很多國家,我的「狀態」值添加到終點,就像這樣:
http://api.wunderground.com/api/ {}鍵/環境/ Q/US /PA/Lancaster.json
問題是當我在印度尋找新德里(在這一點上恐怕也爲其他城市):
的http:// API。 wunderground.com/api/{KEY}/條件/ Q/IN/DL/NewDelhi.json
在這種情況下的反應是這樣的:
"error": {
"type": "querynotfound",
"description": "No cities match your search query"
}
但是如果我通過 「ZMW」 調用的參數條件/新德里在印度
http://api.wunderground.com/api/ {}鍵/conditions/q/zmw:00000.1.42182.json
我看到這個 「DISPLAY_LOCATION」 對象:
"city":"New Delhi/Safdarjung",
"state":"DL",
"state_name":"India",
"country":"IN"
所以,看起來正式的我的端點是正確的。 我在錯什麼?
PS:我使用的是Google Maps Place API
,因爲它也是UI準備好的。 :)