Class: Adzerk::Reporting
- Inherits:
-
Object
show all
- Includes:
- Util
- Defined in:
- lib/adzerk/reporting.rb
Instance Attribute Summary collapse
Instance Method Summary
collapse
Methods included from Util
#camelize_data, #parse_response, #uncamelize_data
Constructor Details
#initialize(args = {}) ⇒ Reporting
7
8
9
|
# File 'lib/adzerk/reporting.rb', line 7
def initialize(args = {})
@client = args.fetch(:client)
end
|
Instance Attribute Details
#client ⇒ Object
Returns the value of attribute client.
5
6
7
|
# File 'lib/adzerk/reporting.rb', line 5
def client
@client
end
|
Instance Method Details
#create_queued_report(data = {}) ⇒ Object
16
17
18
19
|
# File 'lib/adzerk/reporting.rb', line 16
def create_queued_report(data={})
data = { 'criteria' => camelize_data(data).to_json }
parse_response(client.post_request('report/queue', data))
end
|
#create_report(data = {}) ⇒ Object
11
12
13
14
|
# File 'lib/adzerk/reporting.rb', line 11
def create_report(data={})
data = { 'criteria' => camelize_data(data).to_json }
parse_response(client.post_request('report', data))
end
|
#retrieve_queued_report(id) ⇒ Object
21
22
23
24
|
# File 'lib/adzerk/reporting.rb', line 21
def retrieve_queued_report(id)
url = 'report/queue/' + id
parse_response(client.get_request(url))
end
|