Commit 0aa81fb 1 parent 30d3a9d commit 0aa81fb Copy full SHA for 0aa81fb
File tree 3 files changed +17
-21
lines changed
3 files changed +17
-21
lines changed Original file line number Diff line number Diff line change 1
1
[tool .poetry ]
2
2
name = " PyBMKG"
3
- version = " 3.0.0 "
3
+ version = " 3.0.1 "
4
4
description = " Python BMKG API Wrapper"
5
5
authors = [" Kira <kiraware@github.com>" ]
6
6
maintainers = [" Kira <kiraware@github.com>" , " vexra <vexra@github.com>" ]
Original file line number Diff line number Diff line change @@ -13,19 +13,19 @@ class Weather(IntEnum):
13
13
14
14
Attributes:
15
15
CLEAR_SKIES: `0`
16
- PARTLY_CLOUDY : `1`
17
- PARTLY_CLOUDY2 : `2`
16
+ SUNNY : `1`
17
+ PARTLY_CLOUDY : `2`
18
18
MOSTLY_CLOUDY: `3`
19
19
OVERCAST: `4`
20
20
HAZE: `5`
21
21
SMOKE: `10`
22
+ THUNDER: `17`
22
23
FOG: `45`
23
- LIGHT_RAIN: `60`
24
- RAIN: `61`
25
- HEAVY_RAIN: `63`
24
+ LIGHT_RAIN: `61`
25
+ MODERATE_RAIN: `63`
26
26
ISOLATED_SHOWER: `80`
27
- SEVERE_THUNDERSTORM : `95`
28
- SEVERE_THUNDERSTORM2 : `97`
27
+ THUNDERSTORM : `95`
28
+ SEVERE_THUNDERSTORM : `97`
29
29
30
30
Examples:
31
31
>>> Weather(0)
@@ -38,24 +38,19 @@ class Weather(IntEnum):
38
38
True
39
39
>>> print(Weather.CLEAR_SKIES)
40
40
0
41
-
42
- Note:
43
- There is `PARTLY_CLOUDY` and `PARTLY_CLOUDY2`, the weather
44
- condition is equal only the number representation is different. This is
45
- also hold true for `SEVERE_THUNDERSTORM` and `SEVERE_THUNDERSTORM2`.
46
41
"""
47
42
48
43
CLEAR_SKIES : int = 0
49
- PARTLY_CLOUDY : int = 1
50
- PARTLY_CLOUDY2 : int = 2
44
+ SUNNY : int = 1
45
+ PARTLY_CLOUDY : int = 2
51
46
MOSTLY_CLOUDY : int = 3
52
47
OVERCAST : int = 4
53
48
HAZE : int = 5
54
49
SMOKE : int = 10
50
+ THUNDER : int = 17
55
51
FOG : int = 45
56
- LIGHT_RAIN : int = 60
57
- RAIN : int = 61
58
- HEAVY_RAIN : int = 63
52
+ LIGHT_RAIN : int = 61
53
+ MODERATE_RAIN : int = 63
59
54
ISOLATED_SHOWER : int = 80
60
- SEVERE_THUNDERSTORM : int = 95
61
- SEVERE_THUNDERSTORM2 : int = 97
55
+ THUNDERSTORM : int = 95
56
+ SEVERE_THUNDERSTORM : int = 97
Original file line number Diff line number Diff line change @@ -21,7 +21,8 @@ def parse_weather_forecast_data(
21
21
location = parse_location_data (weather_forecast_data ["lokasi" ])
22
22
weathers = [
23
23
parse_weather_data (weather )
24
- for weather in weather_forecast_data ["data" ][0 ]["cuaca" ][0 ]
24
+ for weathers in weather_forecast_data ["data" ][0 ]["cuaca" ]
25
+ for weather in weathers
25
26
]
26
27
27
28
return WeatherForecast (location , weathers )
You can’t perform that action at this time.
0 commit comments