Skip to content
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
merged 2 commits into from
Dec 17, 2020

Conversation

aaearon
Copy link
Contributor

@aaearon aaearon commented Nov 25, 2020

The departures endpoint returns two lists: departures, which returns next departures for a given station id, and servingLines which returns all the lines served at a given station id. This adds get_lines which takes a station_id and returns all the line served at that station returned in servingLines.

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.

@leftshift
Copy link
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.

@leftshift leftshift merged commit f268791 into leftshift:master Dec 17, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants