Class: Svix::Streaming
- Inherits:
-
Object
- Object
- Svix::Streaming
- Defined in:
- lib/svix/api/streaming.rb
Instance Attribute Summary collapse
-
#event_type ⇒ Object
Returns the value of attribute event_type.
-
#events ⇒ Object
Returns the value of attribute events.
-
#sink ⇒ Object
Returns the value of attribute sink.
-
#stream ⇒ Object
Returns the value of attribute stream.
Instance Method Summary collapse
-
#initialize(client) ⇒ Streaming
constructor
A new instance of Streaming.
- #sink_headers_get(stream_id, sink_id) ⇒ Object
- #sink_headers_patch(stream_id, sink_id, http_sink_headers_patch_in) ⇒ Object
- #sink_transformation_get(stream_id, sink_id) ⇒ Object
Constructor Details
#initialize(client) ⇒ Streaming
Returns a new instance of Streaming.
12 13 14 15 16 17 18 |
# File 'lib/svix/api/streaming.rb', line 12 def initialize(client) @client = client @event_type = StreamingEventType.new(client) @events = StreamingEvents.new(client) @sink = StreamingSink.new(client) @stream = StreamingStream.new(client) end |
Instance Attribute Details
#event_type ⇒ Object
Returns the value of attribute event_type.
8 9 10 |
# File 'lib/svix/api/streaming.rb', line 8 def event_type @event_type end |
#events ⇒ Object
Returns the value of attribute events.
9 10 11 |
# File 'lib/svix/api/streaming.rb', line 9 def events @events end |
#sink ⇒ Object
Returns the value of attribute sink.
10 11 12 |
# File 'lib/svix/api/streaming.rb', line 10 def sink @sink end |
#stream ⇒ Object
Returns the value of attribute stream.
11 12 13 |
# File 'lib/svix/api/streaming.rb', line 11 def stream @stream end |
Instance Method Details
#sink_headers_get(stream_id, sink_id) ⇒ Object
20 21 22 23 24 25 26 |
# File 'lib/svix/api/streaming.rb', line 20 def sink_headers_get(stream_id, sink_id) res = @client.execute_request( "GET", "/api/v1/stream/#{stream_id}/sink/#{sink_id}/headers" ) EndpointHeadersOut.deserialize(res) end |
#sink_headers_patch(stream_id, sink_id, http_sink_headers_patch_in) ⇒ Object
28 29 30 31 32 33 34 35 |
# File 'lib/svix/api/streaming.rb', line 28 def sink_headers_patch(stream_id, sink_id, http_sink_headers_patch_in) res = @client.execute_request( "PATCH", "/api/v1/stream/#{stream_id}/sink/#{sink_id}/headers", body: http_sink_headers_patch_in ) EndpointHeadersOut.deserialize(res) end |
#sink_transformation_get(stream_id, sink_id) ⇒ Object
37 38 39 40 41 42 43 |
# File 'lib/svix/api/streaming.rb', line 37 def sink_transformation_get(stream_id, sink_id) res = @client.execute_request( "GET", "/api/v1/stream/#{stream_id}/sink/#{sink_id}/transformation" ) SinkTransformationOut.deserialize(res) end |