Skip to content
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

Missing Parameters in API Request #35

Open
Repsay opened this issue Dec 13, 2024 · 1 comment
Open

Missing Parameters in API Request #35

Repsay opened this issue Dec 13, 2024 · 1 comment

Comments

@Repsay
Copy link

Repsay commented Dec 13, 2024

Issue: Missing Parameters in API Request

The API no longer accepts the following parameters in the request:

  • previousAdvices: prev_advices
  • nextAdvices: next_advices

This change leads to unexpected behavior when loading trip data. Without these parameters, it is unclear how to properly request trips that differentiate between past and future departures.

Current Workaround:

I am currently checking whether the first object in the returned list occurs before the requested travel time. If it does, I discard it, as my use case only requires future departures. However, this is a temporary solution and may not be reliable.

Problem:

I am unsure how this issue should be addressed with the current API implementation. If there are alternative parameters or a new method for achieving this functionality, please provide clarification or update the documentation.

Steps to Reproduce:

  1. Make a request to the API without the previousAdvices and nextAdvices parameters (since they are no longer supported).
  2. Observe the inability to differentiate between past and future departures in the response.
  3. Attempt to filter departures based on the requested travel time.

Expected Behavior:

The API should:

  1. Continue supporting the previousAdvices and nextAdvices parameters, or
  2. Provide alternative parameters or guidance for filtering past and future trips effectively.

Additional Context:

This issue affects applications that require precise filtering of departures for trip planning purposes.

@aquatix
Copy link
Owner

aquatix commented Dec 13, 2024

Oh fun, I wasn't aware they deprecated those parameters. The results sound suboptimal indeed.

I'll try looking at it on Sunday, but will have to dig through the API specs to see what changed and what's the new recommended way of querying. I'll certainly keep your use case of "only future trips" in mind, as it is a very valid and often used one.

Thanks for the detailed feedback!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants