Class: Twitch::TagsResource

Inherits:
Resource show all
Defined in:
lib/twitch/resources/tags.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

#list(**params) ⇒ Object



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

def list(**params)
  response = get_request("tags/streams", params: params)
  Collection.from_response(response, type: Tag)
end

#replace(broadcaster_id:, **params) ⇒ Object

Required scope: channel:manage:broadcast



14
15
16
# File 'lib/twitch/resources/tags.rb', line 14

def replace(broadcaster_id:, **params)
  put_request("streams/tags", body: params.merge(broadcaster_id: broadcaster_id))
end

#stream(broadcaster_id:, **params) ⇒ Object



8
9
10
11
# File 'lib/twitch/resources/tags.rb', line 8

def stream(broadcaster_id:, **params)
  response = get_request("streams/tags", params: params.merge(broadcaster_id: broadcaster_id))
  Collection.from_response(response, type: Tag)
end