Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

amazon_product

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

amazon_product

  • 3.0.1
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

Amazon Product

Amazon Product is a Nokogiri-backed Ruby wrapper to the [Amazon Product Advertising API] 2.

travis

## Installation

Add to your Gemfile.

gem 'amazon_product'

## Usage

Set up a request.

require "amazon_product"

req = AmazonProduct["us"]

req.configure do |c|
  c.key    = AMAZON_KEY
  c.secret = AMAZON_SECRET
  c.tag    = AMAZON_ASSOCIATE_TAG
end

Look up a product.

req << { :operation' => 'ItemLookup',
         :item_id'   => '0679753354' }
resp = request.get

[Or use a shorthand] 3.

resp = req.find('0679753354')

Consume the entire response.

resp.to_hash

Quickly drop down to a particular node.

resp['Item']

[Please see the project page] 4 for further detail.

Adapters

Amazon Product defaults to the Net::HTTP library but can be configured to use Curb or EM-HTTP-Request.

Branding is a delicate art

Amazon Product descends from Sucker. While I still like the vacuum metaphor, the name felt tiring after a while.

FAQs

Package last updated on 01 Sep 2011

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc