通过他们的API获取雅虎天气摄氏度

时间:2016-03-28 01:55:53

标签: yql yahoo-api

尝试在YQL console中进行查询。这个工作正常:

select * from weather.forecast where woeid=1989965

但我想获取公制系统(摄氏度)中的值,所以我使用此查询:

select * from weather.forecast where woeid=1989965 and unit='c'

我得到一个空结果:

{
 "query": {
  "count": 0,
  "created": "2016-03-28T01:46:08Z",
  "lang": "ru",
  "results": null
 }
}

我可以自己转换价值观,但我希望我可以开箱即用......

1 个答案:

答案 0 :(得分:8)

今天我发现了,你=' c'工作。所以,我自己的问题的答案是:

select * from weather.forecast where woeid=1989965 and u='c'
相关问题