Skip to content

Instantly share code, notes, and snippets.

@moxie
Created January 9, 2012 17:24
Show Gist options
  • Save moxie/1583999 to your computer and use it in GitHub Desktop.
Save moxie/1583999 to your computer and use it in GitHub Desktop.
def self.get_product(sku, params = {})
params.reverse_merge!({
'advertiser-ids' => 'joined',
'advertiser-sku' => sku,
'website-id' => COMMISSION_JUNCTION_PID
})
Nokogiri.XML(get('https://product-search.api.cj.com/v2/product-search?', params))
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment