Class: Roistat::Resources::Events
- Defined in:
- lib/roistat/resources/events.rb,
sig/roistat.rbs
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#add(events) ⇒ Object
POST /project/events/add — body is a JSON array.
-
#archive(event_id:, events:) ⇒ Object
POST /project/events/meta/eventId/archive — body is a JSON array.
-
#bulk_send(events) ⇒ Object
POST /project/events/bulk/send — body is a JSON array.
-
#log(**params) ⇒ Object
GET /project/events/log — filters as query params (docs heading; curl shows POST JSON).
-
#send_event(**body) ⇒ Object
POST /project/events/send.
Methods inherited from Base
Constructor Details
This class inherits a constructor from Roistat::Resources::Base
Instance Method Details
#add(events) ⇒ Object
POST /project/events/add — body is a JSON array
15 16 17 |
# File 'lib/roistat/resources/events.rb', line 15 def add(events) client.post("project/events/add", body: events) end |
#archive(event_id:, events:) ⇒ Object
POST /project/events/meta/eventId/archive — body is a JSON array
29 30 31 |
# File 'lib/roistat/resources/events.rb', line 29 def archive(event_id:, events:) client.post("project/events/meta/#{event_id}/archive", body: events) end |
#bulk_send(events) ⇒ Object
POST /project/events/bulk/send — body is a JSON array
10 11 12 |
# File 'lib/roistat/resources/events.rb', line 10 def bulk_send(events) client.post("project/events/bulk/send", body: events) end |
#log(**params) ⇒ Object
GET /project/events/log — filters as query params (docs heading; curl shows POST JSON)
20 21 22 23 24 25 26 |
# File 'lib/roistat/resources/events.rb', line 20 def log(**params) if params.nil? || params.empty? client.get("project/events/log") else client.get("project/events/log", params: params) end end |
#send_event(**body) ⇒ Object
POST /project/events/send
5 6 7 |
# File 'lib/roistat/resources/events.rb', line 5 def send_event(**body) client.post("project/events/send", body: body) end |