Class: Seam::Clients::Events

Inherits:
BaseClient show all
Defined in:
lib/seam/clients/events.rb

Instance Attribute Summary

Attributes inherited from BaseClient

#client

Instance Method Summary collapse

Methods inherited from BaseClient

#initialize, #request_seam, #request_seam_object

Constructor Details

This class inherits a constructor from Seam::Clients::BaseClient

Instance Method Details

#get(event_id: nil, event_type: nil, device_id: nil) ⇒ Object



6
7
8
9
10
11
12
13
14
# File 'lib/seam/clients/events.rb', line 6

def get(event_id: nil, event_type: nil, device_id: nil)
  request_seam_object(
    :post,
    "/events/get",
    Seam::Event,
    "event",
    body: {event_id: event_id, event_type: event_type, device_id: device_id}.compact
  )
end

#list(since: str, event_type: nil, event_types: nil, device_id: nil, device_ids: nil) ⇒ Object



16
17
18
19
20
21
22
23
24
25
# File 'lib/seam/clients/events.rb', line 16

def list(since: str, event_type: nil, event_types: nil, device_id: nil, device_ids: nil)
  request_seam_object(
    :post,
    "/events/list",
    Seam::Event,
    "events",
    body: {event_type: event_type, event_types: event_types, device_id: device_id,
           device_ids: device_ids, since: since}.compact
  )
end