In the twitch challenge, is it possible, using the FCC api, to search through all the channels?

In the twitch challenge, is it possible, using the FCC api, to search through all the channels?
0

#1

I don’t want to just hard-code the channels; I want that my app can search through all the channels available on their website. Is it possible ?


#2

Hi @puneet,

I’m not entirely sure what you mean when you say search through all channels because the API provided by twitch would do just that when given a specific channel name.

If you meant, obtain all channels so that your code could then search through an array of them, that wouldn’t be particularly efficient when twitch already provides the tools for you to do that, especially considering twitch has at least 500k channels.


#3

Im trying to implement a feature where the search gives back a list of channels with the matching letters- sort of like a google search. The given API returns only one channel, that too only when the query matches the channel’s name verbatim. Any workaround this?


#4

I don’t think the fCC API allows returning a list of usernames given a search input. The given API is just enough for satisfying the user stories. I’m not sure if the full Twitch API has what you want, but if ever, you’ll have to sign up for an API key.


#5

Thank you.
I have one more thing to ask. How can I auto refresh the online-offline status of channels every second ?


#6

Hi,

for that you need to reload your ajax function every second.

Please check the below links.
https://datatables.net/reference/api/ajax.reload()


#7

:+1:Got it. Thanks a lot.


#8

fcc api doesn’t check the channels status on every your query though, i know since i implemented a check every 10 minutes, lol. fcc api has its own idea when to check a channel again, so your site will show channels online when they are already offline for a few minutes


#9

I’m not sure if the full Twitch API has what you want

since there exist stream aggregators that include twitch it should allow some kind of filtering