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

Temporary "solution" for followed games #226

Merged
merged 1 commit into from
Dec 20, 2019

Conversation

johnRivs
Copy link

@johnRivs johnRivs commented Dec 12, 2019

Pros

  • Uses v5 so no need to adapt anything to the "New Twitch API."
  • No extra requests.

Cons

  • It's not super accurate as it uses "popularity" as opposed to the actual viewer count, but it's good enough.
  • v5 will be removed from the API eventually, though this affects the entire extension.
  • The "Followed games" view won't show viewers and channels.

Better solution

There's a more involved way to fix this issue, though it still uses v5. Maybe the v5 endpoint can be found in the New Twitch API.

Basically, after the request to get the followed games, make a request to the New Twitch API to get streams using the IDs of the game you got in the previous request. This is the result:

Then it's a matter of going over all the streams and putting the viewer counts together according to game id.

@Ndragomirov Ndragomirov merged commit f748bea into Ndragomirov:master Dec 20, 2019
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

Successfully merging this pull request may close these issues.

2 participants