Weather Warning City List
Get a list of cities for the specified country or region where weather warnings are currently in effect.
See also Weather warning Android SDK to get warning details.
Note: Weather Warning City List only supports China (including Hong Kong, Macao and China Taiwan) now. For other countries and regions, please use Weather Warning.
Tips: For more warning description, see Resource - Warning Info.
Interface Code | Interface | Class |
---|---|---|
getWarningList | Weather warning city list | WarningListBean |
Parameter
-
range
(required)Set country or region, ISO 3166 format, example:range=cn
orrange=hk
. Currently this function only supports city list in China (including Hong Kong, Macao and China Taiwan), for other countries and regions please use Weather Warning to get it separately.
Sample Code
/**
* @param context context
* @param listener network access callback interface
*/
QWeather.getWarningList(Context context, Range range, final QWeather.OnResultWarningListListener listener);
Properties
Properties of WarningListBean
Property | Description | Example |
---|---|---|
getCode | See Status Code | 200 |
getUpdateTime | Last updated time | 2017-10-25T12:34+08:00 |
getWarningBean | Weather warning | List<WarningListBean> |
getRefer | Reference data, includes data source, statements and license | Refer |
Refer
Property | Description | Example |
---|---|---|
getSourcesList | Data source and other statements | QWeather |
getLicenseList | Data license | QWeather Developers License |
WarningListBeanBase Warning Information
Property | Description | Example |
---|---|---|
getLocationId | Location ID | 101280601 |