This repository was archived by the owner on Jun 29, 2023. It is now read-only.
add function to get lines served for a station#27
Merged
leftshift merged 2 commits intoleftshift:masterfrom Dec 17, 2020
Merged
add function to get lines served for a station#27leftshift merged 2 commits intoleftshift:masterfrom
leftshift merged 2 commits intoleftshift:masterfrom
Conversation
7dcb9b9 to
b417975
Compare
Owner
|
Sorry for not responding to this earlier. I like it, hadn't noticed this earlier so I think this was added to the api resonse at some point, so thank you for poking around and adding this! My only worry is that they might remove or change this at some point, as this information seems to not be used by the website and the API hasn't been super stable in general, but then again, this similarly affects all other features of this library. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The departures endpoint returns two lists:
departures, which returns next departures for a given station id, andservingLineswhich returns all the lines served at a given station id. This addsget_lineswhich takes a station_id and returns all the line served at that station returned inservingLines.As info: Despite each object in the results having a
destination, both directions of a line are seemingly represented by only a single line in the api's response.