Class: AWeber::Resources::Account
Instance Attribute Summary
#parent
Instance Method Summary
collapse
#<=>, alias_attribute, api_attr, basepath, #delete, has_many, has_one, #initialize, #inspect, #path, #save, #uri, #writable_attrs
Instance Method Details
#find_subscribers(params = {}) ⇒ Object
15
16
17
18
19
20
21
22
|
# File 'lib/aweber/resources/account.rb', line 15
def find_subscribers(params={})
params = params.map { |k,v| "#{h(k)}=#{h(v)}" }.join("&")
uri = "#{path}?ws.op=findSubscribers&#{params}"
response = client.get(uri).merge(:parent => self)
response["total_size"] ||= response["entries"].size
Collection.new(client, Subscriber, response)
end
|
31
32
33
34
35
36
|
# File 'lib/aweber/resources/account.rb', line 31
def web_form_split_tests
uri = "#{path}?ws.op=getWebFormSplitTests"
response = client.get(uri)
response.map { |split_test| WebFormSplitTest.new(client, split_test) }
end
|
24
25
26
27
28
29
|
# File 'lib/aweber/resources/account.rb', line 24
def web_forms
uri = "#{path}?ws.op=getWebForms"
response = client.get(uri)
response.map { |webform| WebForm.new(client, webform) }
end
|