Class: Userplex::Resources::Events
- Inherits:
-
Object
- Object
- Userplex::Resources::Events
- Defined in:
- lib/userplex/resources/events.rb
Instance Method Summary collapse
-
#capture(name:, data: nil, timestamp: nil, user_id: nil, request_options: {}) ⇒ Userplex::Models::EventCaptureResponse
Capture an event.
-
#initialize(client:) ⇒ Events
constructor
private
A new instance of Events.
Constructor Details
#initialize(client:) ⇒ Events
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 Events.
33 34 35 |
# File 'lib/userplex/resources/events.rb', line 33 def initialize(client:) @client = client end |
Instance Method Details
#capture(name:, data: nil, timestamp: nil, user_id: nil, request_options: {}) ⇒ Userplex::Models::EventCaptureResponse
Capture an event
19 20 21 22 23 24 25 26 27 28 |
# File 'lib/userplex/resources/events.rb', line 19 def capture(params) parsed, = Userplex::EventCaptureParams.dump_request(params) @client.request( method: :post, path: "capture", body: parsed, model: Userplex::Models::EventCaptureResponse, options: ) end |