Weather Warning

Platform: API iOS Android

Get officially issued real-time severe weather warning data around the world.

Tips: For more warning description, see Resource - Warning Info.

Interface Code Interface Class
getWarning Weather Warning WarningBean

Parameter

  • location(required)The location to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI. Example: location=101010100 or location=116.41,39.92
  • langMulti-language setting, please see Language to find out how our multi-language works and how to set up.

Sample Code

QWeather.getWarning(Context context, String location, final QWeather.OnResultWarningListener listener);

QWeather.getWarning(Context context, String location, Lang lang, final QWeather.OnResultWarningListener listener);

Properties

Properties of WarningBean

Property Description Example
getCode See Status Code 200
getBeanBaseList Disaster Warning List<WarningBeanBase>
getRefer Reference data, includes data source, statements and license Refer
getBasic Basic Information Basic

Refer

Property Description Example
getSourcesList Data source and other statements QWeather
getLicenseList Data license QWeather Developers License

Basic

Property Description Example
getUpdateTime Last updated time 2017-10-25T04:34+08:00
getFxLink Responsive web page of this location, easy to embed in your website or APP https://www.qweather.com/severe-weather/beijing-101010100.html

WarningBeanBase Warning Information

Property Description Example
getId The unique identifier of this warning, which can be used to determine whether this warning already exists.  
getPubTime Warning release time 2017-10-25T12:03+08:00
getTitle Title of warning information Shenzhen Meteorological Observatory of Guangdong Province issues yellow lightning warning
getSender Sender of warning information Shenzhen Meteorological Observatory
getStartTime Warning start time, may be null 2017-10-25T12:03+08:00
getEndTime End time of warning, may be null 2017-10-25T12:03+08:00
getStatus Warning status, may be null
active Early warning or first warning
update Warning information update
cancel cancel warning
active
getSeverity Warning severity Moderate
getSeverityColor Preferred color for severity, may be null Blue
getType Warning type ID 1014
getTypeName Warning type name Lightning
getUrgency The urgency of the warning message, may be null Immediate
getCertainty The certainty of the warning message, may be null Likely
getText Detailed description of the warning Shenzhen Meteorological Bureau distributed a yellow warning signal for mine-laying electricity at 12:59 on October 04. Please pay attention to defense.
getRelated Related warning id related warning id of current warning, may be null

Warning Level and Type

See Warning Level and Type