Unique vs. non-unique response: Minn, Germany example

  • 1
  • Problem
  • Updated 4 years ago
Note. I've omitted the key value in the urls below.

Here is an issue I ran into. While this request http://api.wunderground.com/api/_key_... returns a single response with conditions for Minn, Germany, the other, fully qualified request http://api.wunderground.com/api/_key_... returns multiple results response listing the same location twice:
{
"response": {
"version":"0.1",
"termsofService":"http://www.wunderground.com/weather/a...",
"features": {
"conditions": 1
}
, "results": [
{
"name": "Minn",
"city": "Minn",
"state": "",
"country": "DL",
"country_iso3166":"DE",
"country_name":"Germany",
"zmw": "00000.26.10335",
"l": "/q/zmw:00000.26.10335"
}
,
{
"name": "Minn",
"city": "Minn",
"state": "",
"country": "DL",
"country_iso3166":"DE",
"country_name":"Germany",
"zmw": "00000.26.10335",
"l": "/q/zmw:00000.26.10335"
}
]
}
}
Photo of peterfomin

peterfomin

  • 4 Posts
  • 0 Reply Likes

Posted 4 years ago

  • 1
Photo of RxMonitoring

RxMonitoring

  • 2 Posts
  • 0 Reply Likes
Wouldn't the correct call be:
http://api.wunderground.com/api/_key_...

(or q/Germany/Minn.json )
Photo of peterfomin

peterfomin

  • 4 Posts
  • 0 Reply Likes
Request with query q/Germany/Minn.json works exactly the same as q/Minn,Germany.json i.e. returns "non-unique" response with the same city listed twice in the results json element.

I'm just curious why q/Minn.json returns unique result but q/Minn,Germany.json does not.

Strictly speaking, per query documentation http://www.wunderground.com/weather/a..., q/Minn,Germany.json should be specified as q/Germany/Minn.json.
But, in practice WU does support:
q/Minneapolis,MN.json
q/Moscow,Russia.json
q/London,UK.json