Releases: leftshift/python_mvg_api
Expose lines of station
Expose walking time parameter
New optional parameter timeoffset
in get_departures()
to request only departures in more than timeoffset
minutes. (#26)
Filter means of transport when requesting a route
get_route()
now has the additional optional arguments ubahn
, bus
, tram
and sbahn
(which default to true) which can be used to only request routes with some of the available means of transport.
Also, the header for sending the api key has been removed as it obviously isn't checked anymore and the api works without supplying any api keys.
Add support for older python3 versions
Replace f-strings with replace()
to support versions prior to python 3.6.
Further fixes to api changes
- Properly handle HTTP errors returned by the api
- take delay into account for calculating
departureTimeMinutes
- support old style IDs in Station class
Fix api changes
Changes in the MVG api:
The id
in Station objects was changed. Before, it was an int, now it is a string with the format de:09162:xxxx
where xxxx
is the old id.
Changes in the library
As a consequence, get_stations()
and get_nearby_stations()
now return these new IDs. get_departures()
and get_route()
now accept both the new string IDs and the old integer IDs to keep backwards compatibility.
Thanks to @Bastlwastl42 for their pull request :)
closes #15.
Fix api url
The url of the api was changed, this fixes that.
Fix not sending user agent, add change limit option
Fixes a bug where mvg api no longer accepts sending no user agent and accept headers.
Also, get_route()
now has a change_limit
argument for limiting how often changing is allowed in a connection.