Class: Twitch::StreamsResource

Inherits:
Resource
  • Object
show all
Defined in:
lib/twitch/resources/streams.rb

Instance Attribute Summary

Attributes inherited from Resource

#client

Instance Method Summary collapse

Methods inherited from Resource

#initialize

Constructor Details

This class inherits a constructor from Twitch::Resource

Instance Method Details

#followed(user_id:, **params) ⇒ Object

Required scope: user:read:follows User ID must match the user in the OAuth token



11
12
13
14
15
# File 'lib/twitch/resources/streams.rb', line 11

def followed(user_id:, **params)
  response = get_request("streams/followed", params: params.merge(user_id: user_id))

  Collection.from_response(response, type: Stream)
end

#list(**params) ⇒ Object



3
4
5
6
7
# File 'lib/twitch/resources/streams.rb', line 3

def list(**params)
  response = get_request("streams", params: params)

  Collection.from_response(response, type: Stream)
end