Minutely Precipitation
Get minute-level precipitation forecast data every 5 minutes for the next 2 hours in China.
This data is only supported for Chinese cities.
Interface code | Interface | Class |
---|---|---|
minutely | Minutely Precipitation | MinutelyResponse |
Reequest Parameters
Name | Type | Required | Exemple |
---|---|---|---|
longitude | Double | true | 116.41 |
latitude | Double | true | 39.92 |
lang | Lang | false | ZH_HANS |
Sample code
Swift
Task{
do {
let parameter = MinutelyParameter(longitude: 116.41, latitude: 39.92)
let response = try await QWeather.instance
.minutely(parameter)
print(response)
} catch QWeatherError.errorResponse(let error) {
print(error)
} catch {
print(error)
}
}
Objective-C
MinutelyParameter * paramater = [MinutelyParameter instanceWithLongitude:116.41 latitude:39.92 lang:@(LangZH_HANS)];
[QWeatherObjc minutely:paramater completionHandler:^(MinutelyResponse * _Nullable response, NSError * _Nullable error) {
if (response) {
NSLog(@"%@", response.description);
}
if (error) {
NSLog(@"%@", error.localizedDescription);
}
}];
Response
MinutelyResponse
-
code
See Status Code -
updateTime
API last update time -
fxLink
Responsive web page of this data, for embedded in website or APP -
summary
Precipitation description -
minutely.fxTime
Forecast time -
minutely.precip
Accumulated precipitation in 5 minutes, unit is millimeter. -
minutely.type
Type of precipitation,rain
andsnow
-
refer.sources
Data source and other statements, may be null -
refer.license
Data license, may be null