Weather Warning
Get officially issued real-time severe weather warning data around the world.
Tips: For more warning description, see Resource - Warning Info.
Interface code (Enum) | Interface | Class |
---|---|---|
INQUIRE_TYPE_WARNING | Weather warning | WarningBaseClass |
Request Parameters
If no optional parameters are set, the default value will be used.
-
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
orlocation=116.41,39.92
-
lang
Multi-language setting, please see Language to find out how our multi-language works and how to set up.
Sample Code
QWeatherConfigInstance.publicID = @"publicID";
QWeatherConfigInstance.appKey = @"key";
QWeatherConfigInstance.appType = APP_TYPE_BIZ;
QWeatherConfigInstance.location = @"101010100";
QWeatherConfigInstance.lang = @"";
QWeatherConfigInstance.unit = @"";
[QWeatherConfigInstance weatherWithInquireType: INQUIRE_TYPE_WARNING WithSuccess:^(WarningBaseClass *responseObject) {
NSLog(@"Description->%@",[responseObject description]);
} faileureForError:^(NSError *error) {
NSLog(@"error->%@",error);
}];
Response
-
code
See Status Code -
updateTime
API last update time -
fxLink
Responsive web page of this data, for embedded in website or APP -
warning.id
The unique ID of this warning, which can be used to determine whether this warning already exists. -
warning.sender
Warning issuing unit, may be null -
warning.pubTime
Warning release time -
warning.title
Title of warning -
warning.startTime
Warning start time, may be null -
warning.endTime
End time of warning, may be null -
warning.status
Warning status -
warning.level
Warning level (deprecated), Do not usewarning.level
anymore, this field is deprecated and the value will be null or out of date. Please usesseverity
andseverityColor
instead -
warning.severity
Warning severity -
warning.severityColor
Preferred color for severity, may be null -
warning.type
Warning type ID -
warning.typeName
Warning type name -
warning.urgency
The urgency of the warning message, may be null -
warning.certainty
The certainty of the warning message, may be null -
warning.text
Description of the warning -
warning.related
The warning ID associated with this warning, returned when the warning status iscancel
orupdate
. May be null -
refer.sources
Data source and other statements, may be null -
refer.license
Data license, may be null