apyefa 0.0.4__py3-none-any.whl → 0.0.6__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Potentially problematic release.
This version of apyefa might be problematic. Click here for more details.
- apyefa/__init__.py +2 -0
- apyefa/client.py +12 -16
- apyefa/commands/__init__.py +0 -2
- apyefa/commands/command.py +3 -1
- apyefa/commands/command_departures.py +4 -2
- apyefa/commands/command_serving_lines.py +8 -4
- apyefa/commands/command_stop_finder.py +4 -2
- apyefa/commands/command_system_info.py +4 -2
- apyefa/commands/command_trip.py +5 -1
- apyefa/data_classes.py +9 -0
- {apyefa-0.0.4.dist-info → apyefa-0.0.6.dist-info}/METADATA +35 -18
- apyefa-0.0.6.dist-info/RECORD +21 -0
- apyefa/commands/command_add_info.py +0 -51
- apyefa-0.0.4.dist-info/RECORD +0 -22
- {apyefa-0.0.4.dist-info → apyefa-0.0.6.dist-info}/LICENSE +0 -0
- {apyefa-0.0.4.dist-info → apyefa-0.0.6.dist-info}/WHEEL +0 -0
- {apyefa-0.0.4.dist-info → apyefa-0.0.6.dist-info}/top_level.txt +0 -0
apyefa/__init__.py
CHANGED
|
@@ -2,6 +2,7 @@ from apyefa.client import EfaClient
|
|
|
2
2
|
from apyefa.data_classes import (
|
|
3
3
|
Departure,
|
|
4
4
|
Line,
|
|
5
|
+
LineRequestType,
|
|
5
6
|
Location,
|
|
6
7
|
LocationFilter,
|
|
7
8
|
LocationType,
|
|
@@ -12,6 +13,7 @@ from apyefa.data_classes import (
|
|
|
12
13
|
__all__ = [
|
|
13
14
|
"LocationFilter",
|
|
14
15
|
"Location",
|
|
16
|
+
"LineRequestType",
|
|
15
17
|
"LocationType",
|
|
16
18
|
"Departure",
|
|
17
19
|
"SystemInfo",
|
apyefa/client.py
CHANGED
|
@@ -4,7 +4,6 @@ import aiohttp
|
|
|
4
4
|
|
|
5
5
|
from apyefa.commands import (
|
|
6
6
|
Command,
|
|
7
|
-
CommandAdditionalInfo,
|
|
8
7
|
CommandDepartures,
|
|
9
8
|
CommandServingLines,
|
|
10
9
|
CommandStopFinder,
|
|
@@ -14,6 +13,7 @@ from apyefa.data_classes import (
|
|
|
14
13
|
CoordFormat,
|
|
15
14
|
Departure,
|
|
16
15
|
Line,
|
|
16
|
+
LineRequestType,
|
|
17
17
|
Location,
|
|
18
18
|
LocationFilter,
|
|
19
19
|
LocationType,
|
|
@@ -79,14 +79,13 @@ class EfaClient:
|
|
|
79
79
|
_LOGGER.debug(f"limit: {limit}")
|
|
80
80
|
|
|
81
81
|
command = CommandStopFinder("any", name)
|
|
82
|
-
command.add_param("anyMaxSizeHitList", limit)
|
|
83
82
|
|
|
84
83
|
if filters:
|
|
85
84
|
command.add_param("anyObjFilter_sf", sum(filters))
|
|
86
85
|
|
|
87
86
|
response = await self._run_query(self._build_url(command))
|
|
88
87
|
|
|
89
|
-
return command.parse(response)
|
|
88
|
+
return command.parse(response)[:limit]
|
|
90
89
|
|
|
91
90
|
async def location_by_coord(
|
|
92
91
|
self,
|
|
@@ -113,11 +112,10 @@ class EfaClient:
|
|
|
113
112
|
_LOGGER.debug(f"limit: {limit}")
|
|
114
113
|
|
|
115
114
|
command = CommandStopFinder("coord", f"{coord_x}:{coord_y}:{format}")
|
|
116
|
-
command.add_param("anyMaxSizeHitList", limit)
|
|
117
115
|
|
|
118
116
|
response = await self._run_query(self._build_url(command))
|
|
119
117
|
|
|
120
|
-
return command.parse(response)
|
|
118
|
+
return command.parse(response)[:limit]
|
|
121
119
|
|
|
122
120
|
async def trip(self):
|
|
123
121
|
raise NotImplementedError
|
|
@@ -163,20 +161,24 @@ class EfaClient:
|
|
|
163
161
|
|
|
164
162
|
return command.parse(response)
|
|
165
163
|
|
|
166
|
-
async def lines_by_location(
|
|
164
|
+
async def lines_by_location(
|
|
165
|
+
self, location: str | Location, req_types: list[LineRequestType] = []
|
|
166
|
+
) -> list[Line]:
|
|
167
167
|
"""Search for lines that pass `location`. Location can be location ID like `de:08111:6221` or a `Location` object
|
|
168
168
|
|
|
169
169
|
Args:
|
|
170
170
|
location (str | Location): Location
|
|
171
|
+
req_types (list[LineRequestType], optional): List of types for the request. Defaults to empty.
|
|
171
172
|
|
|
172
173
|
Raises:
|
|
173
|
-
ValueError:
|
|
174
|
+
ValueError: Wrong location type provided e.g. LocationType.POI or LocationType.ADDRESS
|
|
174
175
|
|
|
175
176
|
Returns:
|
|
176
177
|
list[Transport]: List of lines
|
|
177
178
|
"""
|
|
178
179
|
_LOGGER.info("Request lines by location")
|
|
179
180
|
_LOGGER.debug(f"location:{location}")
|
|
181
|
+
_LOGGER.debug(f"filters :{req_types}")
|
|
180
182
|
|
|
181
183
|
if isinstance(location, Location):
|
|
182
184
|
if location.loc_type != LocationType.STOP:
|
|
@@ -187,6 +189,9 @@ class EfaClient:
|
|
|
187
189
|
|
|
188
190
|
command = CommandServingLines("odv", location)
|
|
189
191
|
|
|
192
|
+
if req_types:
|
|
193
|
+
command.add_param("lineReqType", sum(req_types))
|
|
194
|
+
|
|
190
195
|
response = await self._run_query(self._build_url(command))
|
|
191
196
|
|
|
192
197
|
return command.parse(response)
|
|
@@ -194,15 +199,6 @@ class EfaClient:
|
|
|
194
199
|
async def locations_by_line(self, line: str | Line) -> list[Location]:
|
|
195
200
|
raise NotImplementedError
|
|
196
201
|
|
|
197
|
-
async def additional_info(self):
|
|
198
|
-
_LOGGER.info("Request additional info")
|
|
199
|
-
|
|
200
|
-
command = CommandAdditionalInfo()
|
|
201
|
-
|
|
202
|
-
response = await self._run_query(self._build_url(command))
|
|
203
|
-
|
|
204
|
-
return command.parse(response)
|
|
205
|
-
|
|
206
202
|
async def _run_query(self, query: str) -> str:
|
|
207
203
|
_LOGGER.info(f"Run query {query}")
|
|
208
204
|
|
apyefa/commands/__init__.py
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
from .command import Command
|
|
2
|
-
from .command_add_info import CommandAdditionalInfo
|
|
3
2
|
from .command_departures import CommandDepartures
|
|
4
3
|
from .command_serving_lines import CommandServingLines
|
|
5
4
|
from .command_stop_finder import CommandStopFinder
|
|
@@ -9,7 +8,6 @@ from .command_trip import CommandTrip
|
|
|
9
8
|
__all__ = [
|
|
10
9
|
"Command",
|
|
11
10
|
"CommandDepartures",
|
|
12
|
-
"CommandAdditionalInfo",
|
|
13
11
|
"CommandStopFinder",
|
|
14
12
|
"CommandSystemInfo",
|
|
15
13
|
"CommandTrip",
|
apyefa/commands/command.py
CHANGED
|
@@ -7,6 +7,8 @@ from apyefa.commands.parsers.rapid_json_parser import RapidJsonParser
|
|
|
7
7
|
from apyefa.exceptions import EfaFormatNotSupported, EfaParameterError
|
|
8
8
|
from apyefa.helpers import is_date, is_datetime, is_time
|
|
9
9
|
|
|
10
|
+
from ..data_classes import CoordFormat
|
|
11
|
+
|
|
10
12
|
_LOGGER = logging.getLogger(__name__)
|
|
11
13
|
|
|
12
14
|
|
|
@@ -18,7 +20,7 @@ class Command:
|
|
|
18
20
|
self._format: str = output_format
|
|
19
21
|
|
|
20
22
|
self.add_param("outputFormat", output_format)
|
|
21
|
-
self.add_param("coordOutputFormat",
|
|
23
|
+
self.add_param("coordOutputFormat", CoordFormat.WGS84.value)
|
|
22
24
|
|
|
23
25
|
def add_param(self, param: str, value: str):
|
|
24
26
|
if not param or not value:
|
|
@@ -3,7 +3,7 @@ import logging
|
|
|
3
3
|
from voluptuous import Any, Date, Datetime, Optional, Required, Schema
|
|
4
4
|
|
|
5
5
|
from apyefa.commands.command import Command
|
|
6
|
-
from apyefa.data_classes import Departure
|
|
6
|
+
from apyefa.data_classes import CoordFormat, Departure
|
|
7
7
|
|
|
8
8
|
_LOGGER = logging.getLogger(__name__)
|
|
9
9
|
|
|
@@ -32,7 +32,9 @@ class CommandDepartures(Command):
|
|
|
32
32
|
return Schema(
|
|
33
33
|
{
|
|
34
34
|
Required("outputFormat", default="rapidJSON"): Any("rapidJSON"),
|
|
35
|
-
Required("coordOutputFormat", default="WGS84"): Any(
|
|
35
|
+
Required("coordOutputFormat", default="WGS84"): Any(
|
|
36
|
+
*[x.value for x in CoordFormat]
|
|
37
|
+
),
|
|
36
38
|
Required("name_dm"): str,
|
|
37
39
|
Required("type_dm", default="stop"): Any("any", "stop"),
|
|
38
40
|
Required("mode", default="direct"): Any("any", "direct"),
|
|
@@ -1,9 +1,9 @@
|
|
|
1
1
|
import logging
|
|
2
2
|
|
|
3
|
-
from voluptuous import Any, Optional, Required, Schema
|
|
3
|
+
from voluptuous import Any, Optional, Range, Required, Schema
|
|
4
4
|
|
|
5
5
|
from apyefa.commands.command import Command
|
|
6
|
-
from apyefa.data_classes import Line
|
|
6
|
+
from apyefa.data_classes import CoordFormat, Line, LineRequestType
|
|
7
7
|
|
|
8
8
|
_LOGGER = logging.getLogger(__name__)
|
|
9
9
|
|
|
@@ -41,14 +41,18 @@ class CommandServingLines(Command):
|
|
|
41
41
|
return Schema(
|
|
42
42
|
{
|
|
43
43
|
Required("outputFormat", default="rapidJSON"): Any("rapidJSON"),
|
|
44
|
-
Required("coordOutputFormat", default="WGS84"): Any(
|
|
44
|
+
Required("coordOutputFormat", default="WGS84"): Any(
|
|
45
|
+
*[x.value for x in CoordFormat]
|
|
46
|
+
),
|
|
45
47
|
Required("mode", default="line"): Any("odv", "line"),
|
|
46
48
|
# mode 'odv'
|
|
47
49
|
Optional("type_sl"): Any("stopID"),
|
|
48
50
|
Optional("name_sl"): str,
|
|
49
51
|
# mode 'line'
|
|
50
52
|
Optional("lineName"): str,
|
|
51
|
-
Optional("lineReqType"):
|
|
53
|
+
Optional("lineReqType"): Range(
|
|
54
|
+
min=0, max=sum([x.value for x in LineRequestType])
|
|
55
|
+
),
|
|
52
56
|
Optional("mergeDir"): Any("0", "1", 0, 1),
|
|
53
57
|
Optional("lsShowTrainsExplicit"): Any("0", "1", 0, 1),
|
|
54
58
|
Optional("line"): str,
|
|
@@ -3,7 +3,7 @@ import logging
|
|
|
3
3
|
from voluptuous import Any, Optional, Range, Required, Schema
|
|
4
4
|
|
|
5
5
|
from apyefa.commands.command import Command
|
|
6
|
-
from apyefa.data_classes import Location, LocationFilter
|
|
6
|
+
from apyefa.data_classes import CoordFormat, Location, LocationFilter
|
|
7
7
|
|
|
8
8
|
_LOGGER = logging.getLogger(__name__)
|
|
9
9
|
|
|
@@ -33,7 +33,9 @@ class CommandStopFinder(Command):
|
|
|
33
33
|
return Schema(
|
|
34
34
|
{
|
|
35
35
|
Required("outputFormat", default="rapidJSON"): Any("rapidJSON"),
|
|
36
|
-
Required("coordOutputFormat", default="WGS84"): Any(
|
|
36
|
+
Required("coordOutputFormat", default="WGS84"): Any(
|
|
37
|
+
*[x.value for x in CoordFormat]
|
|
38
|
+
),
|
|
37
39
|
Required("type_sf", default="any"): Any("any", "coord"),
|
|
38
40
|
Required("name_sf"): str,
|
|
39
41
|
Optional("anyMaxSizeHitList"): int,
|
|
@@ -3,7 +3,7 @@ import logging
|
|
|
3
3
|
from voluptuous import Any, Optional, Required, Schema
|
|
4
4
|
|
|
5
5
|
from apyefa.commands.command import Command
|
|
6
|
-
from apyefa.data_classes import SystemInfo
|
|
6
|
+
from apyefa.data_classes import CoordFormat, SystemInfo
|
|
7
7
|
|
|
8
8
|
_LOGGER = logging.getLogger(__name__)
|
|
9
9
|
|
|
@@ -23,6 +23,8 @@ class CommandSystemInfo(Command):
|
|
|
23
23
|
return Schema(
|
|
24
24
|
{
|
|
25
25
|
Required("outputFormat", default="rapidJSON"): Any("rapidJSON"),
|
|
26
|
-
Optional("coordOutputFormat", default="WGS84"): Any(
|
|
26
|
+
Optional("coordOutputFormat", default="WGS84"): Any(
|
|
27
|
+
*[x.value for x in CoordFormat]
|
|
28
|
+
),
|
|
27
29
|
}
|
|
28
30
|
)
|
apyefa/commands/command_trip.py
CHANGED
|
@@ -4,6 +4,8 @@ from voluptuous import Any, Optional, Required, Schema
|
|
|
4
4
|
|
|
5
5
|
from apyefa.commands.command import Command
|
|
6
6
|
|
|
7
|
+
from ..data_classes import CoordFormat
|
|
8
|
+
|
|
7
9
|
_LOGGER = logging.getLogger(__name__)
|
|
8
10
|
|
|
9
11
|
|
|
@@ -18,7 +20,9 @@ class CommandTrip(Command):
|
|
|
18
20
|
return Schema(
|
|
19
21
|
{
|
|
20
22
|
Required("outputFormat", default="rapidJSON"): Any("rapidJSON"),
|
|
21
|
-
Required("coordOutputFormat", default="WGS84"): Any(
|
|
23
|
+
Required("coordOutputFormat", default="WGS84"): Any(
|
|
24
|
+
*[x.value for x in CoordFormat]
|
|
25
|
+
),
|
|
22
26
|
Required("type_origin", default="any"): Any("any", "coord"),
|
|
23
27
|
Required("name_origin"): str,
|
|
24
28
|
Required("type_destination", default="any"): Any("any", "coord"),
|
apyefa/data_classes.py
CHANGED
|
@@ -76,6 +76,15 @@ class LocationFilter(IntEnum):
|
|
|
76
76
|
POST_CODES = 64
|
|
77
77
|
|
|
78
78
|
|
|
79
|
+
class LineRequestType(IntEnum):
|
|
80
|
+
NONE = 0
|
|
81
|
+
DEPARTURE_MONITOR = 1
|
|
82
|
+
STOP_TIMETABLE = 2
|
|
83
|
+
TIMETABLE = 4
|
|
84
|
+
ROUTE_MAPS = 8
|
|
85
|
+
STATION_TIMETABLE = 16
|
|
86
|
+
|
|
87
|
+
|
|
79
88
|
class CoordFormat(StrEnum):
|
|
80
89
|
WGS84 = "WGS84[dd.ddddd]"
|
|
81
90
|
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.1
|
|
2
2
|
Name: apyefa
|
|
3
|
-
Version: 0.0.
|
|
3
|
+
Version: 0.0.6
|
|
4
4
|
Summary: Python API for EFA(Elektronische Fahrplanauskunft) async requests
|
|
5
5
|
Author-email: Alex Jung <jungdevelop@gmail.com>
|
|
6
6
|
License: MIT License
|
|
@@ -185,16 +185,14 @@ async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
|
185
185
|
```
|
|
186
186
|
|
|
187
187
|
## locations_by_coord()
|
|
188
|
-
Find localities by coordinates.
|
|
189
|
-
|
|
190
|
-
> :x: Currently test endpoint does not sent any answers for this request
|
|
188
|
+
Find localities by their coordinates.
|
|
191
189
|
|
|
192
190
|
### Arguments
|
|
193
191
|
|Arguments|Type |Required|Description|
|
|
194
192
|
|---------|--------------------|--------|-----------|
|
|
195
193
|
|coord_x |float |required|X-coordinate|
|
|
196
194
|
|coord_y |float |required|Y-coordinate|
|
|
197
|
-
|format |[CoordFormat](#coordformat)|optional|Coordinates format used for request
|
|
195
|
+
|format |[CoordFormat](#coordformat)|optional|Coordinates format used for request. Default to WGS84.|
|
|
198
196
|
|limit |int |optional|Max size of returned list. Default value is `10`|
|
|
199
197
|
|
|
200
198
|
### Return value
|
|
@@ -280,14 +278,13 @@ Find lines pass provided location.
|
|
|
280
278
|
|Arguments|Type |Required|Description|
|
|
281
279
|
|---------|--------------------|--------|-----------|
|
|
282
280
|
|location |str \| [Location](#location) |required|The location passed by searched line(s)|
|
|
281
|
+
|req_types|list[[LineRequestType](#lineRequestType)]|optional|The result presentation type(s) can be defined with this argument. Default value is `[]`
|
|
283
282
|
|
|
284
283
|
### Return value
|
|
285
284
|
|Type|Description|
|
|
286
285
|
|----|-----------|
|
|
287
286
|
|list[[Line](#line)]|List of lines found for provided location|
|
|
288
287
|
|
|
289
|
-
> The attribute `origin` of returned `line` objects is None
|
|
290
|
-
|
|
291
288
|
### Examples
|
|
292
289
|
``` python
|
|
293
290
|
async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
@@ -367,17 +364,37 @@ async with EfaClient("https://efa.vgn.de/vgnExt_oeffi/") as client:
|
|
|
367
364
|
## TransportType
|
|
368
365
|
```python
|
|
369
366
|
class TransportType(IntEnum):
|
|
370
|
-
|
|
371
|
-
SUBURBAN
|
|
372
|
-
SUBWAY
|
|
373
|
-
CITY_RAIL
|
|
374
|
-
TRAM
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
EXPRESS_BUS
|
|
378
|
-
|
|
379
|
-
FERRY
|
|
380
|
-
AST
|
|
367
|
+
TRAIN = 0 # Zug
|
|
368
|
+
SUBURBAN = 1 # S-Bahn
|
|
369
|
+
SUBWAY = 2 # U-Bahn
|
|
370
|
+
CITY_RAIL = 3 # Stadtbahn
|
|
371
|
+
TRAM = 4 # Straßenbahn
|
|
372
|
+
CITY_BUS = 5 # Stadtbus
|
|
373
|
+
REGIONAL_BUS = 6 # Regionalbus
|
|
374
|
+
EXPRESS_BUS = 7 # Schnellbus
|
|
375
|
+
CABLE_RAIL = 8 # Seilbahn
|
|
376
|
+
FERRY = 9 # Schief
|
|
377
|
+
AST = 10 # Anruf-Sammel-Taxi
|
|
378
|
+
SUSPENSION_RAIL = 11 # Schwebebahn
|
|
379
|
+
AIRPLANE = 12 # Flugzeug
|
|
380
|
+
REGIONAL_TRAIN = 13 # Reginalzug (z.B. IRE, RE und RB)
|
|
381
|
+
NATIONAL_TRAIN = 14 # Nationaler Zug (z.B. IR und D)
|
|
382
|
+
INTERNATINAL_TRAIN = 15 # Internationaler Zug (z.B. IC und EC)
|
|
383
|
+
HIGH_SPEED_TRAIN = 16 # Hochgeschwindigkeitzüge (z.B. ICE)
|
|
384
|
+
RAIL_REPLACEMENT_TRANSPORT = 17 # Schienenersatzverkehr
|
|
385
|
+
SHUTTLE_TRAIN = 18 # Schuttlezug
|
|
386
|
+
CITIZEN_BUS = 19 # Bürgerbus
|
|
387
|
+
```
|
|
388
|
+
|
|
389
|
+
## LineRequestType
|
|
390
|
+
```python
|
|
391
|
+
class LineRequestType(IntEnum):
|
|
392
|
+
NONE = 0
|
|
393
|
+
DEPARTURE_MONITOR = 1
|
|
394
|
+
STOP_TIMETABLE = 2
|
|
395
|
+
TIMETABLE = 4
|
|
396
|
+
ROUTE_MAPS = 8
|
|
397
|
+
STATION_TIMETABLE = 16
|
|
381
398
|
```
|
|
382
399
|
|
|
383
400
|
## CoordFormat
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
apyefa/__init__.py,sha256=9LuZCm4L02Jz-rgvSyTSQ10fzMEZ0P2nWQQ6m3Z9Ab0,386
|
|
2
|
+
apyefa/client.py,sha256=OP9HnzwufH9joS-Bx7r768yu185ILbpVFGuYV2APjQ0,6832
|
|
3
|
+
apyefa/data_classes.py,sha256=Njt7r8ONEY5KxUz9uVFnPHU9qz9sp5RWmmhiR8ywDiY,11552
|
|
4
|
+
apyefa/exceptions.py,sha256=Vhc8FEtI1xSxbVRLFXd3BlNTekY2w3byEvd3Jhhg8h4,240
|
|
5
|
+
apyefa/helpers.py,sha256=EJyj-Pw3xDrn8WKGbpfqbnaUZjHtVrE2A2LYpTkACps,1695
|
|
6
|
+
apyefa/commands/__init__.py,sha256=kC7Zr8IcahAN8xEOytDUS6WCADQ5oe_nqDIPAjlzxy4,425
|
|
7
|
+
apyefa/commands/command.py,sha256=ruVb8kpvsShsfT4wrgwcCdxqlGnYs4jsXTEoYx873rk,3633
|
|
8
|
+
apyefa/commands/command_departures.py,sha256=kYt6GbXD1XYXEbGpi61TEFBTznqShyOaqJmpRi0mHZ4,1811
|
|
9
|
+
apyefa/commands/command_serving_lines.py,sha256=PSWjr0el4bhq20IaW_P56q8sJ3vNlfV-KpoAUjrsHqo,2212
|
|
10
|
+
apyefa/commands/command_stop_finder.py,sha256=lUkubSe7mVu8M6rss-RumnCPOaJJo_v6qlRNF7n6R88,2019
|
|
11
|
+
apyefa/commands/command_system_info.py,sha256=rhAoeOE8V9Wc3G6z7NDrB9pjcULDz1o7oo-idS4VyXQ,858
|
|
12
|
+
apyefa/commands/command_trip.py,sha256=Mhqv7wR11DtvxfaZSmNF-hLZxgC3XFH3UgBuI2fFEBA,1197
|
|
13
|
+
apyefa/commands/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
14
|
+
apyefa/commands/parsers/parser.py,sha256=1PSlLpfYrNeKRTpvCcYsCzAKlNrs0oHvSN7zpF4Xcs8,140
|
|
15
|
+
apyefa/commands/parsers/rapid_json_parser.py,sha256=UMexRiMKkJLcK5EEj80B6RYkWBuR8ZWD3YpeGa0J3lQ,212
|
|
16
|
+
apyefa/commands/parsers/xml_parser.py,sha256=ru52QtBP68KoTZ8OgjFWrLy-PD4_j1miY8Zv5umNSE8,151
|
|
17
|
+
apyefa-0.0.6.dist-info/LICENSE,sha256=C2Gdvb1B39BeEP-RGqVd7w6j94GnJo4gnYyiC_l3SFQ,1066
|
|
18
|
+
apyefa-0.0.6.dist-info/METADATA,sha256=K0jaxYWYGc9Y3QkAQsdojOyLHWGUM9gBusllwQjbm6Y,16701
|
|
19
|
+
apyefa-0.0.6.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
20
|
+
apyefa-0.0.6.dist-info/top_level.txt,sha256=b9VSv2S7lxdaypCumxO92IEQFpJdFuB8vQs03j5gZxY,7
|
|
21
|
+
apyefa-0.0.6.dist-info/RECORD,,
|
|
@@ -1,51 +0,0 @@
|
|
|
1
|
-
import logging
|
|
2
|
-
|
|
3
|
-
from voluptuous import Any, Optional, Required, Schema
|
|
4
|
-
|
|
5
|
-
from apyefa.commands.command import Command
|
|
6
|
-
|
|
7
|
-
_LOGGER = logging.getLogger(__name__)
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
class CommandAdditionalInfo(Command):
|
|
11
|
-
def __init__(self) -> None:
|
|
12
|
-
super().__init__("XML_ADDINFO_REQUEST", "addinfo")
|
|
13
|
-
|
|
14
|
-
def parse(self, data: dict):
|
|
15
|
-
data = self._get_parser().parse(data)
|
|
16
|
-
|
|
17
|
-
result = []
|
|
18
|
-
|
|
19
|
-
return result
|
|
20
|
-
|
|
21
|
-
def _get_params_schema(self) -> Schema:
|
|
22
|
-
return Schema(
|
|
23
|
-
{
|
|
24
|
-
Required("outputFormat", default="rapidJSON"): Any("rapidJSON"),
|
|
25
|
-
Required("coordOutputFormat", default="WGS84"): Any("WGS84"),
|
|
26
|
-
Optional("filterDateValid"): str,
|
|
27
|
-
Optional("filterDateValidDay"): str,
|
|
28
|
-
Optional("filterDateValidMonth"): str,
|
|
29
|
-
Optional("filterDateValidYear"): str,
|
|
30
|
-
Optional("filterDateValidComponentsActive"): Any("0", "1", 0, 1),
|
|
31
|
-
Optional("filterPublicationStatus"): Any("current", "history"),
|
|
32
|
-
Optional("filterValidIntervalStart"): str,
|
|
33
|
-
Optional("filterValidIntervalEnd"): str,
|
|
34
|
-
Optional("filterOMC"): str,
|
|
35
|
-
Optional("filterOMC_PlaceID"): str,
|
|
36
|
-
Optional("filterLineNumberIntervalStart"): str,
|
|
37
|
-
Optional("filterLineNumberIntervalEnd"): str,
|
|
38
|
-
Optional("filterMOTType"): str,
|
|
39
|
-
Optional("filterPNLineDir"): str,
|
|
40
|
-
Optional("filterPNLineSub"): str,
|
|
41
|
-
Optional("itdLPxx_selLine"): str,
|
|
42
|
-
Optional("itdLPxx_selOperator"): str,
|
|
43
|
-
Optional("itdLPxx_selStop"): str,
|
|
44
|
-
Optional("line"): str,
|
|
45
|
-
Optional("filterInfoID"): str,
|
|
46
|
-
Optional("filterInfoType"): str,
|
|
47
|
-
Optional("filterPriority"): str,
|
|
48
|
-
Optional("filterProviderCode"): str,
|
|
49
|
-
Optional("filterSourceSystemName"): str,
|
|
50
|
-
}
|
|
51
|
-
)
|
apyefa-0.0.4.dist-info/RECORD
DELETED
|
@@ -1,22 +0,0 @@
|
|
|
1
|
-
apyefa/__init__.py,sha256=kohSwa1VlugPyxKa0QZqQFwRi4hIGrKFd74W7NDgunA,342
|
|
2
|
-
apyefa/client.py,sha256=lwAATLU_-QlAkE_n1kqn2BymvWngH84RDb2D2Z1DYbo,6857
|
|
3
|
-
apyefa/data_classes.py,sha256=KKNYuVHF2d_U-CGxmkyf2RoWCP0GPUvWrrzafytxS_0,11392
|
|
4
|
-
apyefa/exceptions.py,sha256=Vhc8FEtI1xSxbVRLFXd3BlNTekY2w3byEvd3Jhhg8h4,240
|
|
5
|
-
apyefa/helpers.py,sha256=EJyj-Pw3xDrn8WKGbpfqbnaUZjHtVrE2A2LYpTkACps,1695
|
|
6
|
-
apyefa/commands/__init__.py,sha256=_E7sD_tVa7xI7vUN1EJUwHovSU1xg0RFtbnQb7be1sQ,506
|
|
7
|
-
apyefa/commands/command.py,sha256=wq3rEaYd3NUpkNqo2sX3Yw9-lcRerp8scAy2SVpx1hs,3577
|
|
8
|
-
apyefa/commands/command_add_info.py,sha256=7RLV81i6sCKM3fW1DDX3RJz6GvkICqjxDICF_464ppU,1983
|
|
9
|
-
apyefa/commands/command_departures.py,sha256=kHOyxxSHn7F7ClAV1fQdl1O4cOVRs6a60pkqc8-r_9o,1736
|
|
10
|
-
apyefa/commands/command_serving_lines.py,sha256=NAS_9cvTq7-Lc9lFEFgVsWavEA730FH1UYqohOCDnR0,2038
|
|
11
|
-
apyefa/commands/command_stop_finder.py,sha256=SXi09wA5fmGxEcMEu3XYEK4mpth-bKUoRzDyspDATWo,1944
|
|
12
|
-
apyefa/commands/command_system_info.py,sha256=0bQ0oYbp7FFqPA1b5RgaxANm9-BYlN5KiwRILCCuDVY,783
|
|
13
|
-
apyefa/commands/command_trip.py,sha256=kOlchWyBRlvWBqwjqpx130VXEh5kly6KMSv_pgCBljs,1095
|
|
14
|
-
apyefa/commands/parsers/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
15
|
-
apyefa/commands/parsers/parser.py,sha256=1PSlLpfYrNeKRTpvCcYsCzAKlNrs0oHvSN7zpF4Xcs8,140
|
|
16
|
-
apyefa/commands/parsers/rapid_json_parser.py,sha256=UMexRiMKkJLcK5EEj80B6RYkWBuR8ZWD3YpeGa0J3lQ,212
|
|
17
|
-
apyefa/commands/parsers/xml_parser.py,sha256=ru52QtBP68KoTZ8OgjFWrLy-PD4_j1miY8Zv5umNSE8,151
|
|
18
|
-
apyefa-0.0.4.dist-info/LICENSE,sha256=C2Gdvb1B39BeEP-RGqVd7w6j94GnJo4gnYyiC_l3SFQ,1066
|
|
19
|
-
apyefa-0.0.4.dist-info/METADATA,sha256=OV6RcIfCeFWX_ta-4_bXp0JC3gr_j-9w5LtTBW1uO6g,15615
|
|
20
|
-
apyefa-0.0.4.dist-info/WHEEL,sha256=PZUExdf71Ui_so67QXpySuHtCi3-J3wvF4ORK6k_S8U,91
|
|
21
|
-
apyefa-0.0.4.dist-info/top_level.txt,sha256=b9VSv2S7lxdaypCumxO92IEQFpJdFuB8vQs03j5gZxY,7
|
|
22
|
-
apyefa-0.0.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|