Class: Iterable::Events
Overview
Interact with /events API endpoints
Instance Attribute Summary
Attributes inherited from ApiResource
#conf
Instance Method Summary
collapse
Methods inherited from ApiResource
#default_config, default_config, #initialize
Instance Method Details
#for_email(email, limit = 30) ⇒ Object
31
32
33
|
# File 'lib/iterable/events.rb', line 31
def for_email(email, limit = 30)
Iterable.request(conf, "/events/#{email}", limit: limit).get
end
|
#track(name, email = nil, attrs = {}) ⇒ Object
51
52
53
54
55
|
# File 'lib/iterable/events.rb', line 51
def track(name, email = nil, attrs = {})
attrs[:eventName] = name
attrs[:email] = email
Iterable.request(conf, '/events/track').post(attrs)
end
|
#track_bulk(events = []) ⇒ Object
67
68
69
|
# File 'lib/iterable/events.rb', line 67
def track_bulk(events = [])
Iterable.request(conf, '/events/trackBulk').post(events: events)
end
|
#track_push_open(campaign_id, message_id, email, attrs = {}) ⇒ Object
89
90
91
92
93
94
|
# File 'lib/iterable/events.rb', line 89
def track_push_open(campaign_id, message_id, email, attrs = {})
attrs[:campaignId] = campaign_id
attrs[:messageId] = message_id
attrs[:email] = email
Iterable.request(conf, '/events/trackPushOpen').post(attrs)
end
|