-
Notifications
You must be signed in to change notification settings - Fork 50
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
expose ConnectionQuery::dateType (time arrival or departure) #66
Comments
Hmm, yes I guess adding a flag is better than adding a second time parameter like How about |
I think passing a parameter |
I'd rather name the argument so that it's clear instead of adding an additional parameter. So have a departuretime and an arrivaltime argument, and throw a 400 error if you get both. |
@colinfrei: this would mean we have |
The downside is that it makes it more magic. in my eyes arguments of which it's obvious what they do are always better than arguments where it's not obvious, even if that means having more arguments. For example you'd still have the situation where it is like it is now, and you're not sure if arrival or departure is meant. |
I agree about the magic but i think that in this case, it would be easier for everybody to have some magic. Defaulting to departure is the way every fahrplan application handles this. so this is clear for me. |
Whether the parameter is an |
+1 This would be a great addition |
PR merged. |
The dateType for the ConnectionQuery should be exposed. This is mentioned in issue #47. Currently it is hard coded to be a departure time.
How should this be exposed. I think a dateType variable which can be set to 1 or 0 is not as clear as it should be.
What about
isDepartureTime
?The text was updated successfully, but these errors were encountered: