Class: Twitch::SharedChatSessionsResource
- Defined in:
- lib/twitch/resources/shared_chat_sessions.rb
Instance Attribute Summary
Attributes inherited from Resource
Instance Method Summary collapse
Methods inherited from Resource
Constructor Details
This class inherits a constructor from Twitch::Resource
Instance Method Details
#retrieve(broadcaster_id:) ⇒ Object
3 4 5 6 7 8 9 10 |
# File 'lib/twitch/resources/shared_chat_sessions.rb', line 3 def retrieve(broadcaster_id:) response = get_request("shared_chat/session", params: { broadcaster_id: broadcaster_id }) data = response.body.dig("data") return nil if data.nil? || data.empty? SharedChatSession.new(data[0]) end |