class Adzerk::Publisher
Public Instance Methods
create(opts={}, subid=nil)
click to toggle source
# File lib/adzerk/publisher.rb, line 16 def create(opts={}, subid=nil) e = (subid && subendpoint) ? "#{subendpoint}/#{subid}/#{endpoint}" : endpoint data = { datakey => camelize_data(opts).to_json } response = @client.post_request(e, data) parse_response(response) end
earnings(data={})
click to toggle source
# File lib/adzerk/publisher.rb, line 4 def earnings(data={}) data = { 'earnings' => camelize_data(data).to_json } response = @client.post_request('/earnings', data) parse_response(response) end
payments(data={})
click to toggle source
# File lib/adzerk/publisher.rb, line 10 def payments(data={}) data = { 'payments' => camelize_data(data).to_json } response = @client.post_request('/payments', data) parse_response(response) end
update(opts={})
click to toggle source
# File lib/adzerk/publisher.rb, line 23 def update(opts={}) id = opts[:id].to_s data = { datakey => camelize_data(opts).to_json } response = @client.put_request("#{endpoint}/#{id}", data) parse_response(response) end