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

stations/query does not return any stations #50

Open
Colum31 opened this issue Aug 9, 2022 · 2 comments
Open

stations/query does not return any stations #50

Colum31 opened this issue Aug 9, 2022 · 2 comments
Assignees
Labels

Comments

@Colum31
Copy link

Colum31 commented Aug 9, 2022

When I try to query a station by the name, the API always returns an empty response.

To reproduce (the example in the documentation):

curl 'https://v5.vbb.transport.rest/stations?query=mehringd' -s | jq

Best regards
Daniel

@derhuerst
Copy link
Owner

I will look at this once I'm back at my computer, probably on Tuesday.

If you want to dig into this in the meantime, the logic for this is in vbb-stations-autocomplete.

@derhuerst derhuerst added the bug label Aug 11, 2022
derhuerst added a commit to derhuerst/vbb-stations-autocomplete that referenced this issue Aug 16, 2022
@derhuerst
Copy link
Owner

This happens because vbb-rest#5 uses an outdated version of vbb-stations (^4), which contains a list of all VBB stations. For now, I suggest using the /locations?query=… route, which uses HAFAS underneath instead of vbb-stations:

curl 'https://v5.vbb.transport.rest/locations?query=mehringd&addresses=false&poi=false&results=3' -s | jq
[
	{
		"type": "stop",
		"id": "900000017101",
		"stationDHID": "de:11000:900017101",
		"name": "U Mehringdamm",
		"location": {
			"type": "location",
			"id": "900017101",
			"latitude": 52.49357,
			"longitude": 13.388138
		},
		"products": {
			"suburban": false,
			"subway": true,
			"tram": false,
			"bus": true,
			"ferry": false,
			"express": false,
			"regional": false
		},
	},
	// …
]

@derhuerst derhuerst self-assigned this Nov 24, 2022
derhuerst added a commit that referenced this issue Dec 17, 2022
fixes #50
Only fixes the issue for v6 of the API though.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants