justintv / Twitch-API

A home for details about our API
www.twitch.tv
1.72k stars 381 forks source link

Ways to pull info for streamers who have streamed a game recently #351

Open esupin opened 9 years ago

esupin commented 9 years ago

I'm looking for a way to pull information from streamers who have streamed a game recently (past week, month, etc) - not just ones that are currently live. Is there a way to do this?

I found some lines that might be helpful to finding this information, but I'm having trouble differentiating between whether or not the requests are returning only channels that are live, or if they also return channels that are associated with a game but not streaming at the moment. Any help would be appreciated: GET /search/channels GET /search/streams GET /search/games GET /videos/top

Also, I noticed there's a "Limit" parameter to many search results, with the max search results set to 100. If a query has over 100 search results, how does it decide which 100 to give you? Alphabetical or by largest view count? Is there a way to change the query to get results to see more than the first 100 returned results?

scagood commented 9 years ago

What are you trying to accomplish by getting previously played games?

GET /search/channels - Returns a list of channel objects matching the search query. GET /search/streams - Returns a list of stream objects matching the search query. GET /search/games - Returns a list of game objects matching the search query. GET /videos/top - Returns a list of videos created in a given time period sorted by number of views, most popular first.

none of those would seem to help finding old games.

You could try to see if they have previous videos with "GET /channels/:channel/videos" where the game may be there but other than that I don't believe you can

Hope this helps, scagood