More enums added
This commit is contained in:
parent
5e4ca07877
commit
37727e38bf
@ -1,2 +1,6 @@
|
||||
from .product import Product
|
||||
from .rt_mode import RealTimeMode
|
||||
from .rt_mode import RealTimeMode
|
||||
from .lang import Language
|
||||
from .location_type import LocationType
|
||||
from .selection_mode import SelectionMode
|
||||
from .filter_mode import FilterMode
|
14
pyrmv/enums/filter_mode.py
Normal file
14
pyrmv/enums/filter_mode.py
Normal file
@ -0,0 +1,14 @@
|
||||
from enum import auto
|
||||
from .auto_name import AutoName
|
||||
|
||||
class FilterMode(AutoName):
|
||||
"""Enumeration used to declare filters for nearby searches."""
|
||||
|
||||
DIST_PERI = auto()
|
||||
"Accentuate matches. Matches in the radius are first."
|
||||
|
||||
EXCL_PERI = auto()
|
||||
"Returns matches inside the radius only."
|
||||
|
||||
SLCT_PERI = auto()
|
||||
"Matches in the radius are excluded. Returns matches outside the radius only."
|
41
pyrmv/enums/lang.py
Normal file
41
pyrmv/enums/lang.py
Normal file
@ -0,0 +1,41 @@
|
||||
from enum import auto
|
||||
from .auto_name import AutoName
|
||||
|
||||
class Language(AutoName):
|
||||
"""Enumeration used to declare locales as ISO-3166 codes (but only available in HAFAS ones)."""
|
||||
|
||||
DE = auto()
|
||||
"German"
|
||||
|
||||
DA = auto()
|
||||
"Danish"
|
||||
|
||||
EN = auto()
|
||||
"English"
|
||||
|
||||
ES = auto()
|
||||
"Spanish"
|
||||
|
||||
FR = auto()
|
||||
"French"
|
||||
|
||||
HU = auto()
|
||||
"Hungarian"
|
||||
|
||||
IT = auto()
|
||||
"Italian"
|
||||
|
||||
NL = auto()
|
||||
"Dutch"
|
||||
|
||||
NO = auto()
|
||||
"Norwegian"
|
||||
|
||||
PL = auto()
|
||||
"Polish"
|
||||
|
||||
SV = auto()
|
||||
"Swedish"
|
||||
|
||||
TR = auto()
|
||||
"Turkish"
|
32
pyrmv/enums/location_type.py
Normal file
32
pyrmv/enums/location_type.py
Normal file
@ -0,0 +1,32 @@
|
||||
from enum import auto
|
||||
from .auto_name import AutoName
|
||||
|
||||
class LocationType(AutoName):
|
||||
"""Enumeration used to declare types of location filter."""
|
||||
|
||||
S = auto()
|
||||
"Search for station/stops only"
|
||||
|
||||
A = auto()
|
||||
"Search for addresses only"
|
||||
|
||||
P = auto()
|
||||
"Search for POIs only"
|
||||
|
||||
AP = auto()
|
||||
"Search for addresses and POIs"
|
||||
|
||||
SA = auto()
|
||||
"Search for station/stops and addresses"
|
||||
|
||||
SE = auto()
|
||||
"Search for stations/stops and entrypoints"
|
||||
|
||||
SP = auto()
|
||||
"Search for stations/stops and POIs"
|
||||
|
||||
ALL = auto()
|
||||
"Search in all existing location pools"
|
||||
|
||||
SPE = auto()
|
||||
"Search for stations/stops, POIs and entrypoints"
|
@ -35,14 +35,13 @@ class Product(AutoNameProduct):
|
||||
"A bus (contracted from omnibus, with variants multibus, motorbus, autobus, etc.) is a road vehicle that carries significantly more passengers than an average car or van."
|
||||
|
||||
BUS2 = auto()
|
||||
""
|
||||
"Also a bus, but now idea why it exists anyway."
|
||||
|
||||
FERRY = auto()
|
||||
|
||||
"A ferry is a ship used to carry passengers, and sometimes vehicles and cargo, across a body of water."
|
||||
|
||||
TAXI = auto()
|
||||
|
||||
"A taxi, also known as a taxicab or simply a cab, is a type of vehicle for hire with a driver, used by a single passenger or small group of passengers, often for a non-shared ride."
|
||||
|
||||
BAHN = auto()
|
||||
|
||||
|
||||
"Rail transport (also known as train transport) is a means of transport that transfers passengers and goods on wheeled vehicles running on rails, which are located on tracks. In contrast to road transport, where the vehicles run on a prepared flat surface, rail vehicles (rolling stock) are directionally guided by the tracks on which they run."
|
11
pyrmv/enums/selection_mode.py
Normal file
11
pyrmv/enums/selection_mode.py
Normal file
@ -0,0 +1,11 @@
|
||||
from enum import auto
|
||||
from .auto_name import AutoName
|
||||
|
||||
class SelectionMode(AutoName):
|
||||
"""Enumeration used to declare location selection modes."""
|
||||
|
||||
SLCT_A = auto()
|
||||
"Selectable"
|
||||
|
||||
SLCT_N = auto()
|
||||
"Not selectable"
|
Loading…
Reference in New Issue
Block a user