我创建了一个谷歌天气api,它允许用户输入一个城市,并获得3天的天气详细信息。
谷歌已经关闭了这项服务。
使用yahoo api,我需要一个WOEID来获取天气详细信息。有没有办法让我从雅虎获得3天的天气,并在这个过程中将一个位置更改为WOEID,或者我应该看看替代api。下面是yahoo api所需的一个示例。
http://weather.yahooapis.com/forecastrss?p=SFXX0044&u=c&d=5
发布于 2014-03-20 16:46:36
我强烈推荐使用forecast.io,它非常容易使用具有丰富天气数据源的API
发布于 2013-07-02 05:12:01
你可以查看这个免费的天气API - https://www.mashape.com/george-vustrey/ultimate-weather-forecasts#!documentation
旧金山7天天气的样本结果:
[
{
"day_of_week": "Mon",
"high": "80.23",
"low": "56.19",
"condition": "Partly cloudy in the evening."
},
{
"day_of_week": "Tue",
"high": "78.32",
"low": "59.2",
"condition": "Mostly cloudy throughout the day."
},
{
"day_of_week": "Wed",
"high": "87.21",
"low": "57.64",
"condition": "Mostly cloudy throughout the day."
},
{
"day_of_week": "Thu",
"high": "90.1",
"low": "60.91",
"condition": "Clear throughout the day."
},
{
"day_of_week": "Fri",
"high": "88.66",
"low": "57.88",
"condition": "Clear throughout the day."
},
{
"day_of_week": "Sat",
"high": "86.5",
"low": "54.11",
"condition": "Partly cloudy in the morning."
},
{
"day_of_week": "Sun",
"high": "89.62",
"low": "52.42",
"condition": "Clear throughout the day."
}
]发布于 2013-11-28 21:07:23
我在我的网站上使用OpenWeatherMap。你可以试试另一种选择。
https://stackoverflow.com/questions/12876989
复制相似问题