Class: Twitch::TagsResource
- Defined in:
- lib/twitch/resources/tags.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
- #list(**params) ⇒ Object
-
#replace(broadcaster_id:, **params) ⇒ Object
Required scope: channel:manage:broadcast.
- #stream(broadcaster_id:, **params) ⇒ Object
Methods inherited from Resource
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 |