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

How to get viewer count for a stream/game #2

Closed
alexjudeking opened this issue Apr 3, 2019 · 1 comment
Closed

How to get viewer count for a stream/game #2

alexjudeking opened this issue Apr 3, 2019 · 1 comment

Comments

@alexjudeking
Copy link

More of a question than an issue, but how do I retrieve the viewer count for a certain game or stream? Doesn't appear that the viewer_count variable exists.

Cheers

@Freguglia
Copy link
Owner

Hello, sorry for the (very) late response. I didn't receive a notification for some reason.

You can use the function get_streams()$data to retrieve the information including viewer count.
You can also use the argument game_id to query streams of specific games.

As an example: get_streams(game_id = 488552)$data[ ,c("user_name", "viewer_count")] retrieves data of top streams for game_id 488552 and selects only the user_name and viewer_count columns of the returned dataframe object.

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