Class: Rum::V1
- Inherits:
-
Object
- Object
- Rum::V1
- Defined in:
- lib/openobserve-api/api/rum/v1.rb
Instance Method Summary collapse
-
#initialize(connection) ⇒ V1
constructor
A new instance of V1.
- #logs(org_id:, body:) ⇒ Object
- #replay(org_id:, event:, segment:) ⇒ Object
- #rum(org_id:, body:) ⇒ Object
Constructor Details
#initialize(connection) ⇒ V1
Returns a new instance of V1.
5 6 7 |
# File 'lib/openobserve-api/api/rum/v1.rb', line 5 def initialize(connection) @connection = connection end |
Instance Method Details
#logs(org_id:, body:) ⇒ Object
9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'lib/openobserve-api/api/rum/v1.rb', line 9 def logs(org_id:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/rum/v1/{org_id}/logs' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: body ) end |
#replay(org_id:, event:, segment:) ⇒ Object
23 24 25 26 27 28 29 30 31 32 33 34 35 36 |
# File 'lib/openobserve-api/api/rum/v1.rb', line 23 def replay(org_id:, event:, segment:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'event is required' if event.nil? raise ArgumentError, 'segment is required' if segment.nil? @connection.call( :POST, '/rum/v1/{org_id}/replay' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], form: { 'event' => event, 'segment' => segment } ) end |
#rum(org_id:, body:) ⇒ Object
38 39 40 41 42 43 44 45 46 47 48 49 50 |
# File 'lib/openobserve-api/api/rum/v1.rb', line 38 def rum(org_id:, body:) raise ArgumentError, 'org_id is required' if org_id.nil? raise ArgumentError, 'body is required' if body.nil? @connection.call( :POST, '/rum/v1/{org_id}/rum' .gsub('{org_id}', ERB::Util.url_encode(org_id.to_s)), type: nil, auth: ['Authorization'], body: body ) end |