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 API to get warning details.
For more warning information, see Warning Info.
Interface code (Enum) | Interface | Class |
---|---|---|
INQUIRE_TYPE_WARNINGLIST | List of warning cities | WarningListClass |
Request Parameters
If no optional parameters are set, the default value will be used.
-
range
(required)Set country or region. See supported countries or regions for Weather Warning, ISO 3166 format. Example:range=cn
-
appKey
(required)API authentication key, please refer to How To Get Your Key. For example:appKey=12334567890ABC
Sample Code
QWeatherConfigInstance.publicID = @"publicID";
QWeatherConfigInstance.appKey = @"key";
QWeatherConfigInstance.appType = APP_TYPE_BIZ;
QWeatherConfigInstance.range = @"cn";
[QWeatherConfigInstance weatherWithInquireType: INQUIRE_TYPE_WARNINGLIST WithSuccess:^(WarningListClass *responseObject) {
NSLog(@"Description->%@",[responseObject description]);
} faileureForError:^(NSError *error) {
NSLog(@"error->%@",error);
}];
Response
-
code
API status code, please refer to Status Code -
updateTime
API last update time -
warningLocList.locationId
List of Location ID for warning -
refer.sources
Data source and other statements, may be null -
refer.license
Data license, may be null