librenews icon indicating copy to clipboard operation
librenews copied to clipboard

FR: filter source via get parameter

Open mueller-ma opened this issue 8 years ago • 4 comments

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

mueller-ma avatar Aug 01 '17 14:08 mueller-ma

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?

milesmcc avatar Aug 02 '17 01:08 milesmcc

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

mueller-ma avatar Aug 02 '17 12:08 mueller-ma

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.

milesmcc avatar Aug 02 '17 16:08 milesmcc

That might be a good option

mueller-ma avatar Aug 02 '17 16:08 mueller-ma