Module: Emma::API::Triggers

Included in:
Client
Defined in:
lib/emma/api/triggers.rb

Instance Method Summary collapse

Instance Method Details

#add_trigger(params = {}) ⇒ Object

Create a new trigger.



12
13
14
# File 'lib/emma/api/triggers.rb', line 12

def add_trigger(params = {})
  post("/triggers", params)
end

#get_trigger_by_id(id) ⇒ Object

Look up a trigger by trigger id.



17
18
19
# File 'lib/emma/api/triggers.rb', line 17

def get_trigger_by_id(id)
  get("/triggers/#{id}")
end

#get_trigger_mailings(id, params = {}) ⇒ Object

Get mailings sent by a trigger.



32
33
34
# File 'lib/emma/api/triggers.rb', line 32

def get_trigger_mailings(id, params = {})
  get("/triggers/#{id}/mailings", params)
end

#my_triggers(params = {}) ⇒ Object

Get a basic listing of all triggers in an account.



7
8
9
# File 'lib/emma/api/triggers.rb', line 7

def my_triggers(params = {})
  get("/triggers")
end

#remove_trigger(id) ⇒ Object

Delete a trigger.



27
28
29
# File 'lib/emma/api/triggers.rb', line 27

def remove_trigger(id)
  delete("/triggers/#{id}")
end

#update_trigger(id, params = {}) ⇒ Object

Update or edit a trigger.



22
23
24
# File 'lib/emma/api/triggers.rb', line 22

def update_trigger(id, params = {})
  put("/triggers/#{id}", params)
end