Mvg-api

Latest version: v1.2.7

Safety actively analyzes 621329 Python packages for vulnerabilities to keep your Python projects secure.

Scan your dependencies

Page 1 of 2

1.2.7

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

1.2.6

New optional parameter `timeoffset` in `get_departures()` to request only departures in more than `timeoffset` minutes. (26)

1.2.5

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.

1.2.4

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

1.2.3

* Properly handle HTTP errors returned by the api
* take delay into account for calculating `departureTimeMinutes`
* support old style IDs in Station class

1.2.2

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.

Page 1 of 2

© 2024 Safety CLI Cybersecurity Inc. All Rights Reserved.