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

FR: filter source via get parameter #7

Open
mueller-ma opened this issue Aug 1, 2017 · 4 comments
Open

FR: filter source via get parameter #7

mueller-ma opened this issue Aug 1, 2017 · 4 comments

Comments

@mueller-ma
Copy link

E.g. librenews.io/api?source=bbc&source=cnn will return news from bbc and cnn. This would make it possible to use one api server for multiple languages with adding the parameters to the server url string in the android app

@milesmcc
Copy link
Owner

milesmcc commented Aug 2, 2017

I think perhaps filtering responses by channels or by offering multiple endpoints is perhaps a better way... don't you think? Channels are pre-defined and static, while sources are variable and not meant to act as filters. I do think that a channel filtration parameter, however, would be appropriate. Thoughts?

@mueller-ma
Copy link
Author

Would you use one channel for breaking news for all sources? Or name the channel e.g. "breaking news bbc". IMO latter is better, because multiple sources may report the same event

@milesmcc
Copy link
Owner

milesmcc commented Aug 2, 2017

Ultimately, channels are meant to be dynamic (currently they are hard-coded), so I think adopting an approach like 'breaking news bbc' would be appropriate. That's a little further away, though, so I'm going to leave this issue open and wait for the codebase to develop a bit more.

@mueller-ma
Copy link
Author

mueller-ma commented Aug 2, 2017

That might be a good option

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