Closed Bastlwastl42 closed 4 years ago
Hey, thanks for the issue and pull request, much appreciated :)
I'd like to keep backwards compatibility for using old-style integer IDs in get_routes()
and get_departures()
. Let's just check for int
there and use a helper function to prepend the new id prefix, as the last part of the new IDs seem to be the old IDs.
Also, we should update the docstrings for get_locations()
and get_nearby_stations()
to reflect these new IDs in the station objects.
If you don't have time to make these changes, I can fit them in some time this evening, as I'd like to release this as soon as I can.
Hey,
Having the ID split and stored separately sounds like a good idea. I also have the impression that the new format is
I wouldn't necessarily split the new IDs but I'd like to have some mechanism to silently convert old IDs to new IDs to remain backwards compatible.
Yeah, I'm also curious about the new ID format, I'll see whether I can find something about that. It looks like they are switching to universally unique station IDs, maybe there's some standard or oganisation for assigning those prefixes.
Great, I'll take care of it later then. :)
I added a sanity check function for the new station id format as mentioned/proposed in issue #15