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

Choose a tag to compare

@leftshift leftshift released this 17 Dec 01:02

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

Choose a tag to compare

@leftshift leftshift released this 25 Nov 17:20

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

Choose a tag to compare

@leftshift leftshift released this 20 Oct 18:53

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

Choose a tag to compare

@leftshift leftshift released this 16 Apr 01:13

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

Further fixes to api changes

Choose a tag to compare

@leftshift leftshift released this 28 Feb 22:09
  • 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

Choose a tag to compare

@leftshift leftshift released this 05 Dec 21:10

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

Choose a tag to compare

@leftshift leftshift released this 09 Oct 21:02

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

Fix not sending user agent, add change limit option

Choose a tag to compare

@leftshift leftshift released this 01 Oct 13:00

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.