-
-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Combine search and query in station prompt #2
Combine search and query in station prompt #2
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I like the change, please see the code comments...
Thank you.
The use case for using the ID is when the tool is used in a dashboard where the ID will never change and having one fewer REST call that may fail is desirable. |
There seems to be something wrong with the selection:
It seems to select "Marktplatz Adlershof" even if I choose another entry... |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good, thanks.
I worked on eliminating the extra hop of searching for stations first before querying for departure.
The change here is introduces a new flag,
-station
where a user inputs the name of the station they are interested, the library query for stations matching the name, prompts the user to select on from the list and uses the id of the selection to fetch the departure information.Sample usage:
![Screenshot 2019-10-20 at 13 39 57](https://user-images.githubusercontent.com/11221027/67158991-53724e00-f33f-11e9-89c6-fa3497029371.png)
departures -station haupt
Say the user selects
![Screenshot 2019-10-20 at 13 40 24](https://user-images.githubusercontent.com/11221027/67159004-69800e80-f33f-11e9-8ece-e3f322257767.png)
S Potsdam Hauptbahnhof
, thenMaybe it can replace the current functionality but I don't where there's another desirable use case for the
id