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

Releases: leftshift/python_mvg_api

Expose lines of station

17 Dec 01:02
Compare
Choose a tag to compare

New function get_lines(station_id) and method Station.get_lines() that returns a list of lines that serve this station. (#27)

Expose walking time parameter

25 Nov 17:20
Compare
Choose a tag to compare

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

20 Oct 18:53
Compare
Choose a tag to compare

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

16 Apr 01:13
Compare
Choose a tag to compare

Replace f-strings with replace() to support versions prior to python 3.6.

Further fixes to api changes

28 Feb 22:09
Compare
Choose a tag to compare
  • 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

05 Dec 21:10
Compare
Choose a tag to compare

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

09 Oct 21:02
Compare
Choose a tag to compare

The url of the api was changed, this fixes that.

Fix not sending user agent, add change limit option

01 Oct 13:00
Compare
Choose a tag to compare

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.