twitch Lists of Streamers by Game Getting the First Page in Ruby

Help us to keep this website almost Ad Free! It takes only 10 seconds of your time:
> Step 1: Go view our video on YouTube: EF Core Bulk Extensions
> Step 2: And Like the video. BONUS: You can also share it!


This Ruby example uses Mechanize, a library to automate web interactions.

client_id is an OAuth client_id.

game is the game directory to list.

require 'mechanize'
master_agent =

client_id = "123"
game = "Minecraft"

url = "{game}&client_id=#{client_id}"
final_list = []
master_agent.get(url) do |page|
    master_list = JSON.parse(page.body)
    master_list["streams"].each do |stream|
        final_list << stream["channel"]["name"]

Got any twitch Question?