Class: Inttegro::Resources::Broadcasts
- Inherits:
-
Object
- Object
- Inttegro::Resources::Broadcasts
- Defined in:
- lib/inttegro/resources/broadcasts.rb
Overview
Client for observing and canceling asynchronous Chime broadcasts.
Access this resource through Client#broadcasts.
Instance Method Summary collapse
-
#cancel(broadcast_id:) ⇒ Inttegro::Broadcast::CancelDetail
Request cancellation of a broadcast that has not won its execution race.
-
#initialize(http) ⇒ Broadcasts
constructor
A new instance of Broadcasts.
-
#lookup(broadcast_id:) ⇒ Inttegro::Broadcast::Detail
Retrieve a broadcast and its current delivery state.
Constructor Details
#initialize(http) ⇒ Broadcasts
Returns a new instance of Broadcasts.
11 12 13 |
# File 'lib/inttegro/resources/broadcasts.rb', line 11 def initialize(http) @http = T.let(http, Inttegro::HTTPClient) end |
Instance Method Details
#cancel(broadcast_id:) ⇒ Inttegro::Broadcast::CancelDetail
Request cancellation of a broadcast that has not won its execution race.
29 30 31 32 33 |
# File 'lib/inttegro/resources/broadcasts.rb', line 29 def cancel(broadcast_id:) @http.post_resource("/broadcasts/cancel", Inttegro::Broadcast::CancelDetail, :broadcast, { broadcast_id: broadcast_id } ) end |
#lookup(broadcast_id:) ⇒ Inttegro::Broadcast::Detail
Retrieve a broadcast and its current delivery state.
19 20 21 22 23 |
# File 'lib/inttegro/resources/broadcasts.rb', line 19 def lookup(broadcast_id:) @http.post_resource("/broadcasts/lookup", Inttegro::Broadcast::Detail, :broadcast, { broadcast_id: broadcast_id } ) end |