class Outbrain::Api::PromotedLink

Constants

PATH
RESOURCE_NAME

Public Class Methods

campaign_path(campaign_id) click to toggle source
# File lib/outbrain/api/promoted_link.rb, line 9
def self.campaign_path(campaign_id)
  "campaigns/#{campaign_id}/#{PATH}"
end
create(attributes) click to toggle source
# File lib/outbrain/api/promoted_link.rb, line 13
def self.create(attributes)
  Request.create(campaign_path(attributes.delete(:campaign_id)),
    { as: self, attributes: attributes })
end
find(id) click to toggle source
# File lib/outbrain/api/promoted_link.rb, line 18
def self.find(id)
  Request.find( PATH, id, { as: self })
end
update(id, attributes) click to toggle source
# File lib/outbrain/api/promoted_link.rb, line 27
def self.update(id, attributes)
  Request.update(PATH, id, {as: self, attributes: attributes, wrap_response: false })
end
where(options) click to toggle source
# File lib/outbrain/api/promoted_link.rb, line 22
def self.where(options)
  Request.where(campaign_path(options.fetch(:campaign_id)),
    options, as: self, resource_name: RESOURCE_NAME)
end