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 connected to" endpoint? #28

Open
joecorcoran opened this issue Jun 5, 2018 · 2 comments
Open

"Stations connected to" endpoint? #28

joecorcoran opened this issue Jun 5, 2018 · 2 comments

Comments

@joecorcoran
Copy link

Hey there,

Thanks so much for all the incredibly useful VBB libraries, and especially for running this REST API!

I wondered if you'd be interested in this API having an endpoint exposing the data in vbb-stations-connected-to – maybe at GET /stations/:id/connected-stations or similar.

I'm using the connected stations data in a single-page app and at the moment my only options are to 1. include the huge blob of data as JavaScript (very large, makes my app > 1 MB) or 2. run my own API exposing only this data, and have my app make requests to two different APIs.

I'd be up for doing the implementation if you don't have time. I just wanted to check here before doing any work on it. Maybe there are design/performance reasons why you don't want to do this, I'm not sure.

@derhuerst
Copy link
Owner

I wondered if you'd be interested in this API having an endpoint exposing the data in vbb-stations-connected-to – maybe at GET /stations/:id/connected-stations or similar.

Definitely! This would be a very useful feature. Pull request welcome!

The only caveat I see is that vbb-stations-connected-to might become outdated if i forget to update it. But this applies to all other vbb-* dependencies that this API uses, so I'd say that's negligible.

[...] include the huge blob of data as JavaScript (very large, makes my app > 1 MB) [...]

I also think that vbb-stations-connected-to can be made smaller if we store the original IDs only once and use placeholder IDs.

@joecorcoran
Copy link
Author

Great! I'll post again here when I've got started.

I also think that vbb-stations-connected-to can be made smaller if we store the original IDs only once and use placeholder IDs.

Agreed. I can take a look at this at the same time.

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

No branches or pull requests

2 participants