public-transport / hafas-client

JavaScript client for HAFAS public transport APIs.
ISC License
278 stars 54 forks source link

/journeys invalid poi #299

Closed vidkazan closed 1 year ago

vidkazan commented 1 year ago

Hi!

I make /journey request with valid POI from API documentation, and receive "invalid poi" from server:

Request: https://v6.db.transport.rest/journeys?from.id=991592571&from.latitude=50.769349&from.longitude=6.09537&to=8089222

Response: { "message": "invalid POI" }

Screenshot:

Screenshot 2023-10-18 at 14 50 08
derhuerst commented 1 year ago

Thanks for reporting!

This is actually an issue with the db-rest#6 docs. (But I can't transfer this Issue to the db-rest repo.)

Unfortunately, for legacy reasons, hafas-client@6 imposes a limitation onto the API: You need to pass from.name=… too, but ironically, you can pick any value for it.

I have fixed this in https://github.com/derhuerst/db-rest/commit/8482862f769fb6ed030223d8b7837190bb9229ab.