diff options
author | Aki <please@ignore.pl> | 2022-09-23 23:49:06 +0200 |
---|---|---|
committer | Aki <please@ignore.pl> | 2022-09-23 23:49:06 +0200 |
commit | 790b76fa00d1cdc9ad17d8c0986d8ac82e623a77 (patch) | |
tree | 6822e4e09daa4935f25c3fec748b141ff8439d5f | |
parent | dc36c343f493375560350cec3d1beab469f30302 (diff) | |
download | windy-790b76fa00d1cdc9ad17d8c0986d8ac82e623a77.zip windy-790b76fa00d1cdc9ad17d8c0986d8ac82e623a77.tar.gz windy-790b76fa00d1cdc9ad17d8c0986d8ac82e623a77.tar.bz2 |
Extended Enums for Levels and Models
-rw-r--r-- | windy.py | 32 |
1 files changed, 29 insertions, 3 deletions
@@ -5,13 +5,39 @@ import requests API = "https://api.windy.com/api" -class Model(Enum): - ICONEU = "iconEu" - +class _StrEnum(Enum): def __str__(self): return self.value +class Model(_StrEnum): + AROME = "arome" + GEOS5 = "geos5" + GFS = "gfs" + GFSWAVE = "gfsWave" + ICONEU = "iconEu" + NAMALASKA = "namAlaska" + NAMCONUS = "namConus" + NAMHAWAII = "namHawaii" + + +class Level(_StrEnum): + SURFACE = "surface" + H1000 = "1000h" + H950 = "950h" + H925 = "925h" + H900 = "900h" + H850 = "850h" + H800 = "800h" + H700 = "700h" + H600 = "600h" + H500 = "500h" + H400 = "400h" + H300 = "300h" + H200 = "200h" + H150 = "150h" + + class PointForecast: ENDPOINT = "/point-forecast/v2" |