The base URL:http://www.google.com/ig/api?
This is the base URL which can be extended with the following parameters:
The Weather parameter:weather=location
Where location can be either a zip code (weather=24060); city name, state (weather=woodland,PA); city name, country (weather=london,england); or possibly others. Try it out and see what response you get back to test your location.
The language parameter:hl=ISO 639-1 Language Code
For example, to get the weather for Paris, France in French, one would use the following URL:http://www.google.com/ig/api?weather=paris,france&hl=fr
The Google Weather API is not an official public Google API so use it wisely. Also check out Yahoo’s Weather API for a more official, fully documented API.
本文介绍了如何使用Google天气API获取指定地点的天气信息,包括基本URL及参数设置方法。文中详细解释了weather参数和language参数的用法,并提供了一个获取法国巴黎天气的实例URL。
1352

被折叠的 条评论
为什么被折叠?



