Skip to content
This repository was archived by the owner on Jun 29, 2023. It is now read-only.

Commit b9eaa79

Browse files
committed
update docstrings to reflect new station ids
1 parent 52ab474 commit b9eaa79

File tree

1 file changed

+12
-4
lines changed

1 file changed

+12
-4
lines changed

mvg_api/__init__.py

Lines changed: 12 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ def get_nearby_stations(lat, lon):
8080
'type': 'station',
8181
'latitude': 48.12046,
8282
'longitude': 11.61869,
83-
'id': 1060,
83+
'id': 'de:09162:1060',
8484
'place': 'München',
8585
'name': 'Innsbrucker Ring',
8686
'hasLiveData': True,
@@ -138,7 +138,7 @@ def get_locations(query):
138138
'type': 'station',
139139
'latitude': 48.12046,
140140
'longitude': 11.61869,
141-
'id': 1060,
141+
'id': 'de:09162:1060',
142142
'place': 'München',
143143
'name': 'Innsbrucker Ring',
144144
'hasLiveData': True,
@@ -188,11 +188,15 @@ def get_route(start, dest,
188188
change_limit=None):
189189
"""Plans a route from start to dest
190190
191+
Change in 1.3.1: accepts both 'old-style' integer IDs which were used
192+
by the API before this version and the new string IDs which
193+
look like `de:09162:6`.
194+
191195
Parameters
192196
----------
193-
start : int/tuple
197+
start : int/str/tuple
194198
The `station_id` of the starting station or a tuple of coordinates
195-
dest : int/tuple
199+
dest : int/str/tuple
196200
`station_id` of the destination station or a tuple of coordinates
197201
time : datetime, optional
198202
arrival_time : bool, optional
@@ -261,6 +265,10 @@ def get_route(start, dest,
261265
def get_departures(station_id):
262266
"""Get the next departures for `station_id`.
263267
268+
Change in 1.3.1: accepts both 'old-style' integer IDs which were used
269+
by the API before this version and the new string IDs which
270+
look like `de:09162:6`.
271+
264272
To get the `station_id` associated with a station name,
265273
use :func:`get_id_for_station`.
266274

0 commit comments

Comments
 (0)