【问题标题】:Getting only temperature from Yahoo Weather仅从雅虎天气获取温度
【发布时间】:2013-10-31 04:29:03
【问题描述】:

我想从 Yahoo 天气 API 获取温度,我正在使用以下代码:

http://query.yahooapis.com/v1/public/yql?q=select * from weather.forecast where location%3D"48906"&format=json

我只想检索温度而不是其他任何东西。

【问题讨论】:

  • 您能解释一下“我只是想检索温度”的意思吗?您想要单位内的温度 json 属性(C 或 F)还是预测 json 属性内的高/低?

标签: json yql


【解决方案1】:

我只想检索温度而不是其他任何东西。

这是一个两步过程,您需要构建请求,然后处理结果以获取温度。

请看:http://tutorialzine.com/2012/05/weather-forecast-geolocation-jquery/

http://www.onextrapixel.com/2011/08/22/adding-weather-to-your-site-with-jquery-and-yql/

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 2012-08-24
    • 1970-01-01
    • 2014-05-13
    • 2013-07-06
    • 2012-08-16
    • 2013-02-09
    • 2014-11-20
    • 1970-01-01
    相关资源
    最近更新 更多