Class: Newslettre::Lists
Defined Under Namespace
Classes: Email, Object
Instance Attribute Summary
Attributes inherited from APIModule
#api
Instance Method Summary
collapse
Methods inherited from APIModule
#initialize
Instance Method Details
#add(list, data = {}) ⇒ Object
29
30
31
|
# File 'lib/newslettre/lists.rb', line 29
def add list, data = {}
request 'add', data.merge(:list => list)
end
|
#delete(list) ⇒ Object
48
49
50
|
# File 'lib/newslettre/lists.rb', line 48
def delete list
request 'delete', :list => list
end
|
#edit(list, data = {}) ⇒ Object
44
45
46
|
# File 'lib/newslettre/lists.rb', line 44
def edit list, data = {}
request 'edit', data.merge(:list => list)
end
|
#get(list) ⇒ Object
33
34
35
|
# File 'lib/newslettre/lists.rb', line 33
def get list
Object.new self, list
end
|
37
38
39
40
41
|
# File 'lib/newslettre/lists.rb', line 37
def list
request('get').map {|r|
Object.new self, r["list"]
}
end
|