Class: Seam::Clients::Events
- Inherits:
-
Object
- Object
- Seam::Clients::Events
- Defined in:
- lib/seam/routes/clients/events.rb
Instance Method Summary collapse
- #get(device_id: nil, event_id: nil, event_type: nil) ⇒ Object
-
#initialize(client:, defaults:) ⇒ Events
constructor
A new instance of Events.
- #list(access_code_id: nil, access_code_ids: nil, acs_system_id: nil, acs_system_ids: nil, between: nil, connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_id: nil, device_ids: nil, event_ids: nil, event_type: nil, event_types: nil, limit: nil, since: nil, unstable_offset: nil) ⇒ Object
Constructor Details
#initialize(client:, defaults:) ⇒ Events
Returns a new instance of Events.
6 7 8 9 |
# File 'lib/seam/routes/clients/events.rb', line 6 def initialize(client:, defaults:) @client = client @defaults = defaults end |
Instance Method Details
#get(device_id: nil, event_id: nil, event_type: nil) ⇒ Object
11 12 13 14 15 |
# File 'lib/seam/routes/clients/events.rb', line 11 def get(device_id: nil, event_id: nil, event_type: nil) res = @client.post("/events/get", {device_id: device_id, event_id: event_id, event_type: event_type}.compact) Seam::Resources::SeamEvent.load_from_response(res.body["event"]) end |
#list(access_code_id: nil, access_code_ids: nil, acs_system_id: nil, acs_system_ids: nil, between: nil, connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_id: nil, device_ids: nil, event_ids: nil, event_type: nil, event_types: nil, limit: nil, since: nil, unstable_offset: nil) ⇒ Object
17 18 19 20 21 |
# File 'lib/seam/routes/clients/events.rb', line 17 def list(access_code_id: nil, access_code_ids: nil, acs_system_id: nil, acs_system_ids: nil, between: nil, connect_webview_id: nil, connected_account_id: nil, customer_key: nil, device_id: nil, device_ids: nil, event_ids: nil, event_type: nil, event_types: nil, limit: nil, since: nil, unstable_offset: nil) res = @client.post("/events/list", {access_code_id: access_code_id, access_code_ids: access_code_ids, acs_system_id: acs_system_id, acs_system_ids: acs_system_ids, between: between, connect_webview_id: connect_webview_id, connected_account_id: connected_account_id, customer_key: customer_key, device_id: device_id, device_ids: device_ids, event_ids: event_ids, event_type: event_type, event_types: event_types, limit: limit, since: since, unstable_offset: unstable_offset}.compact) Seam::Resources::SeamEvent.load_from_response(res.body["events"]) end |