“Every user” means “everyone using the CMS and using the plugin”, so they have to sign up on Twitch and get their own credentials in order to use the plugin.
What you see on the screenshot is cached data. It’s cached for 5 minutes. After 5 minutes, a background job updates the data and the next time you open the site, the fresh data will be displayed.
The process is simple: You define a list of channels you want to display on your site. The background job splits the list into chunks of max. 100 channels per chunk and performs one request per chunk to read the general channel information. Then, i am iterating through the result list and fetch the follower count for every channel. In my example, i made 4 calls until then.
After getting the general informations, i am going to fetch the stream data. The logic is the same: Split the list of channels into chunks, … 5 calls so far.
Last but not least, i am fetching the names of the games, that are currently being played by those channels, which are currently live.
At the end, i’ve made 6 calls for 3 channels, which is “okay”. However, this works max. 13 channels without hitting the API limit. But in relation, i could grab up to 1.000 channel- stream- and game informations at once, if the follower count would be available in the users endpoint (or if i relinguish the follower count). That’s way more than 13 ![]()
There are exactly 0 duplicates
Performance is something i really care about when developing my extensions for the mass.