[API] Sina weather interface Beta, api Sina weather beta
Sina's daily interface was well recognized by the public, but it was very ugly after Baidu, so he built a tool class. Here, he helped to write down the daily interface, see where to change.
Jar name: NonentityUtil
Class Name: SinaWeatherUtil, such as Sina Tianqi Util
Method Name: getWeatherByCity (String city, int forecastDays), the Gender city region obtains the weather
Input data: city, city, Pinyin, or pinyin ([BUG] The city returned by Pinyin is also pinyin );
ForecastDays: The weather data is calculated daily, and 11 days (including today) are recognized by default)
Outgoing metric data: Map <String, Object> weathers, weather set
Collections |
Description |
Continents |
Continent, greater Europe |
Country |
China |
City |
City |
UpdateTime |
Update Time |
Temperature |
Degree of Parallelism |
Weather |
Weather |
WindDirection |
Direction |
Hummidity |
Degree of Parallelism |
AirPollutionIndex |
Air quality before |
AirPollutionStatus |
Air quality before |
WarnColor |
Alert colors |
WarnName |
Warning name |
HourlyTemperatures |
24 hours weather/hour-by-hour Weather |
|
Time |
Time |
|
Weather |
Weather |
|
Temperature |
Degree of Parallelism |
WeatherForecasts |
Weather conditions |
|
Date |
Date |
|
Week |
Week |
|
DaytimeWeather |
Daily Weather |
|
NightWeather |
Night weather |
|
DaytimeTemperature |
Daytime degree of Parallelism |
|
NightTemperature |
Night Interval |
|
WindDirection |
Direction |
|
AirPollutionIndex |
Air Quality Metric |
|
AirPollutionStatus |
Air Quality |
Sunrise |
Sunrise |
Sunset |
Sunset |
Dress |
Dressing |
Exercise |
Operation |
Clod |
Catch a cold |
CarWash |
Car Wash |
Under the address: http://download.csdn.net/detail/u011689438/9416686