Class: Adzerk::ScheduledReporting

Inherits:
ApiEndpoint show all
Defined in:
lib/adzerk/scheduled_reporting.rb

Instance Attribute Summary

Attributes inherited from ApiEndpoint

#client, #datakey, #endpoint, #subendpoint

Instance Method Summary collapse

Methods inherited from ApiEndpoint

#initialize, #update

Methods included from Util

#camelize_data, #parse_response, #uncamelize_data

Constructor Details

This class inherits a constructor from Adzerk::ApiEndpoint

Instance Method Details

#create(data) ⇒ Object



3
4
5
6
7
# File 'lib/adzerk/scheduled_reporting.rb', line 3

def create(data)
    url = "report/schedule"
    formatted_data = data.transform_keys{ |key| key.downcase }
    parse_response(@client.post_json_request(url, camelize_data(formatted_data)))
end

#delete(report_id) ⇒ Object



19
20
21
22
# File 'lib/adzerk/scheduled_reporting.rb', line 19

def delete(report_id)
    url = "report/schedule/#{report_id}/delete"
    parse_response(@client.get_request(url))
end

#get(report_id) ⇒ Object



9
10
11
12
# File 'lib/adzerk/scheduled_reporting.rb', line 9

def get(report_id)
    url = "report/schedule/#{report_id}"
    parse_response(@client.get_request(url))
end

#listObject



14
15
16
17
# File 'lib/adzerk/scheduled_reporting.rb', line 14

def list()
    url = "report/schedule"
    parse_response(@client.get_request(url))
end