Class: Believe::Resources::Matches::Commentary
- Inherits:
-
Object
- Object
- Believe::Resources::Matches::Commentary
- Defined in:
- lib/believe/resources/matches/commentary.rb
Overview
Server-Sent Events (SSE) streaming endpoints
Instance Method Summary collapse
-
#initialize(client:) ⇒ Commentary
constructor
private
A new instance of Commentary.
-
#stream(match_id, request_options: {}) ⇒ Object
Stream live match commentary for a specific match.
Constructor Details
#initialize(client:) ⇒ Commentary
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns a new instance of Commentary.
31 32 33 |
# File 'lib/believe/resources/matches/commentary.rb', line 31 def initialize(client:) @client = client end |
Instance Method Details
#stream(match_id, request_options: {}) ⇒ Object
Stream live match commentary for a specific match. Uses Server-Sent Events (SSE) to stream commentary events in real-time.
19 20 21 22 23 24 25 26 |
# File 'lib/believe/resources/matches/commentary.rb', line 19 def stream(match_id, params = {}) @client.request( method: :post, path: ["matches/%1$s/commentary/stream", match_id], model: ::Believe::Internal::Type::Unknown, options: params[:request_options] ) end |