Weather Warning

Platform: API iOS Android

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

For more warning information, see 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.

Weather warnings are not available in all cities, see supported countries or regions for weather warnings.

  • appKey(required)API authentication key, please refer to How To Get Your Key. For example: appKey=12334567890ABC
  • langMulti-language settings, only support Chinese and English for this data. The available value are lang=zh and lang=en

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 API status code, please refer to 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), this field is deprecated and uses severity and severityColor 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 is cancel or update. May be null
  • refer.sources Data source and other statements, may be null
  • refer.license Data license, may be null

Warning Level and Type

See Warning Level and Type