Air Quality
For iOS SDK v4.9+Air Quality real-time and daily forecast for Chinese cities and 1,700 monitoring stations, including AQI, air quality levels, primary pollutants, PM10, PM2.5, ozone, and nitrogen dioxide , sulfur dioxide, carbon monoxide values.
Interface code (Enum) | Interface | Class |
---|---|---|
INQUIRE_TYPE_WEATHER_AIR_NOW | Air Quality Live | AirBaseClass |
INQUIRE_TYPE_WEATHER_AIR_5D | Air quality 5-day forecast | AirBaseClass |
Request Parameters
If no optional parameters are set, the default value will be used.
location
The city to be queried, support LocationID or comma-separated longitude and latitude (decimal, up to 2 decimal places), LocationID can be obtained by GeoAPI.
appKey
API authentication key, please refer to How To Get Your Key.
For example: appKey=12334567890ABC
lang
Multi-language, default Chinese, if data does not match the language you set, it will return in English or its native language. Language parameter please refer to Language
Sample Code
QWeatherConfigInstance.publicID = @"publicID";
QWeatherConfigInstance.appKey = @"key";
QWeatherConfigInstance.appType = APP_TYPE_BIZ;
QWeatherConfigInstance.location = @"101010100";
QWeatherConfigInstance.lang = @"";
QWeatherConfigInstance.unit = @"";
[QWeatherConfigInstance weatherWithInquireType:INQUIRE_TYPE_WEATHER_AIR_NOW WithSuccess:^(AirBaseClass *responseObject) {
NSLog(@"Description->%@",[responseObject description]);
} faileureForError:^(NSError *error) {
NSLog(@"error->%@",error);
}];
Response
station
, the air data from monitoring station are only response for cities in POI-Air-Monitoring-Station-List.
Parameters | Description |
---|---|
code |
API status code, please refer to Status Code |
updateTime |
|
fxLink |
Responsive web page of this data, for embedded in website or APP |
now.pubTime |
The data release time from the data source |
now.aqi |
Air Quality Index |
now.level |
AQI level |
now.category |
AQI category |
now.primary |
The main pollutant. If |
now.pm10 |
PM10 |
now.pm2p5 |
PM2.5 |
now.no2 |
Nitrogen dioxide |
now.so2 |
Sulfur dioxide |
now.co |
Carbon monoxide |
now.o3 |
Ozone |
station.name |
The name of the monitoring station |
station.id |
ID of the monitoring station |
station.pubTime |
The data release time from the data source |
station.aqi |
Air Quality Index |
station.level |
AQI level |
station.category |
AQI category |
station.primary |
The main pollutant. If |
station.pm10 |
PM10 |
station.pm2p5 |
PM2.5 |
station.no2 |
Nitrogen dioxide |
station.so2 |
Sulfur dioxide |
station.co |
Carbon monoxide |
station.o3 |
Ozone |
daily.fxDate |
Forecast date |
daily.aqi |
Air Quality Index |
daily.level |
AQI level |
daily.category |
AQI category |
daily.primary |
The main pollutant. If |
refer.sources |
Data source and other statements, may be null |
refer.license |
Data license, may be null |
Air Quality Index Level
See Air Quality Info.