-
Notifications
You must be signed in to change notification settings - Fork 0
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
Some ideas #2
Comments
Thank you very much for your feedback 🙂
For a general overview about which methods are supported, you could just check the main module object's attributes, e.g. if {
when: "Date of the journey",
results: "Number of results returned",
specialOption: "Module-Specific option description"
} Do you think this would be enough for developers?
👍 Same probably for
This makes sense, however I'm also not sure about the option being
I wouldn't have a problem with that, @derhuerst opinions?
I see why this would make sense, however I'm not sure if we shouldn't add products to the FPTF spec first, then. |
That sounds very good!
You are right, sounds good.
Would be fine for me.
Aren't they kind of supported through |
As far as I know, We also have the reserved |
Let's call it
Why not make it optional? I'm not sure yet if it makes sense for all API clients to have a
Let's pick
@ialokim Keep in mind that A A edit: @juliuste already explained this. |
Okay, I see that point, but
I would go for requiring it here to have a wider standard, clients for APIs that doesn't support this option could only return the first x results when
I quite like the idea of using the same naming as specified in FTPF, so I would vote for
Okay, I was not aware of that difference, but after having a quick read on FPTF#4, I agree with @juliuste that this should be first discussed for FTPF and then added here accordingly. |
@derhuerst was probably also referring to the proposed options "dictionary" (with descriptions), so let's just call it
I agree with @ialokim here.
I kind of agree with both of you here 🙈. In theory @derhuerst|s proposal seems more elegant to me, but I also share @ialokim|s concerns. This might seem dumb, but I worry about Also, APIs (at least those that I have covered) are significantly more likely to only support the "most default" use case However, at the same time All in all, I probably slightly favour using |
I'd be very careful with this approach. One of the reasons why @juliuste and I set out to create yet another format/standard is because the existing standards were to bloated/strict/inflexible. |
In
Most trains, buses and planes APIs that I know of have these as exclusive variants. |
Fair point. Maybe a different name helps.
I think this is part of the problem. While we should recognize that "journey from A to B starting at 11 am" is what people usually expect, they often want "journey from A to B arriving at 12 am", but don't expect the journey planning algorithm to support this.
|
re What about handling |
Sounds good to me, I implemented this (for now, since nobody complained). Will add the other proposals later this week, if you don't mind 🙂 |
Ok, I think I implemented everything proposed here, so I'll close this issue for now. Feel free to re-open (or to create separate issues) if I forgot anything. |
First, thanks a lot @juliuste for working on this draft! I've had a quick look and in general it looks quite reasonable and good to me. However, I wanted to make some little suggestions:
departures: yes/no
or even which of theopt
of each method are supported), but I think this would be very helpful while developing projects that want to access different clients, while being aware of the specific features.stations/stops/regions.nearby
, I would opt for adding another required option calledresults
to specify the maximum number of results returned (as injourneys
orstopovers
).stopovers
, I would add a required (?) optionwhenRepresents
as injourneys
to specify if we want to query departures or arrivals.stations.search()
andstations.nearby()
I suggest renamingstations()
tostations.all()
.journeys
I think it would be quite useful to addproducts
to the (required) options as e.g. supported by the hafas-client or even name itmodes
sticking to the vocab used in FTPF.The text was updated successfully, but these errors were encountered: