From 27c1c62e10abf7a132b126c2a27981eefad47cb1 Mon Sep 17 00:00:00 2001 From: Joe Rayhawk Date: Sat, 17 Sep 2016 17:08:43 -0700 Subject: lstwitchfollowers.rb: stream API interface to use newly required client_id --- lstwitchfollowers.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lstwitchfollowers.rb') diff --git a/lstwitchfollowers.rb b/lstwitchfollowers.rb index 4ee51d6..a5c3076 100755 --- a/lstwitchfollowers.rb +++ b/lstwitchfollowers.rb @@ -36,7 +36,7 @@ def followers(http, path, key, width, client_id) total = response['_total'] for channel in response['follows'] name = channel[key]['name'] - stream = JSON.parse(http.request(Net::HTTP::Get.new("/kraken/streams/#{name}")).body)['stream'] + stream = JSON.parse(http.request(Net::HTTP::Get.new("/kraken/streams/#{name}?client_id=#{client_id}")).body)['stream'] if stream printf( "%-45s %-36s %6i %6i %-.#{width-46-37-7-7}s\n", "ONLINE twitch.tv/#{name}", stream['channel']['game'].to_s, stream['viewers'], stream['channel']['followers'], stream['channel']['status'].to_s.gsub(/\n/,'') ) # print(" #{stream['game']} #{stream['channel']['status']}") -- cgit v1.2.3