Module: Unit::Event
- Defined in:
- lib/unit/models/event/event.rb,
lib/unit/models/event/list_event_params.rb
Defined Under Namespace
Classes: ListEventParams
Constant Summary collapse
- EVENT_LIST_LIMIT =
100
- EVENT_LIST_OFFSET =
0
Class Method Summary collapse
-
.fire_event(event_id:) ⇒ Object
Fire event.
-
.get_event(event_id:) ⇒ Object
Get event by id.
-
.list_events(limit: EVENT_LIST_LIMIT, offset: EVENT_LIST_OFFSET, type: nil, since: nil, _until: nil) ⇒ Object
List events.
Class Method Details
.fire_event(event_id:) ⇒ Object
Fire event
32 33 34 |
# File 'lib/unit/models/event/event.rb', line 32 def fire_event(event_id:) Unit::Resource::EventResource.fire(event_id) end |
.get_event(event_id:) ⇒ Object
Get event by id
13 14 15 |
# File 'lib/unit/models/event/event.rb', line 13 def get_event(event_id:) Unit::Resource::EventResource.get(event_id) end |
.list_events(limit: EVENT_LIST_LIMIT, offset: EVENT_LIST_OFFSET, type: nil, since: nil, _until: nil) ⇒ Object
List events
24 25 26 27 |
# File 'lib/unit/models/event/event.rb', line 24 def list_events(limit: EVENT_LIST_LIMIT, offset: EVENT_LIST_OFFSET, type: nil, since: nil, _until: nil) params = ListEventParams.new(limit, offset, type, since, _until) Unit::Resource::EventResource.list(params) end |