Skip to content
A Ruby wrapper to the eBay Web Services API
Ruby
Find file
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Failed to load latest commit information.
features
lib
spec
.gitignore
.rvmrc
.travis.yml
Gemfile
README.md
Rakefile
agent_cooper.gemspec
agent_cooper.jpg

README.md

Agent Cooper

Gem Version Build Status Dependency Status Code Climate Coverage Status

AgentCooper is a minimal Ruby wrapper to the eBay Web Services API.

The following eBay APIs are supported:

Installation

Add this line to your application's Gemfile:

  gem "agent_cooper"

And then execute:

  $ bundle install

Or install it yourself as:

  $ gem install agent_cooper

Usage

First, set the app id to your eBay app id:

  AgentCooper.configure do |config|
    config.app_id = "YOUR_EBAY_APP_ID"
  end

Initialize a request without parameters:

  AgentCooper::Finder.new

Initialize a request with parameters:

  AgentCooper::Shopper.new(parameters: { "KEY" => "value" })

Add parameters after initialization:

  request = AgentCooper::Shopper.new
  request << {
    'OPERATION-NAME' => 'getSearchKeywordsRecommendation',
    'KEYWORDS'       => 'arry potter'
  }

Perform a request:

  request.get
  #=> #<AgentCooper::Response:0x007ffd5c2ca040 @response="...">

Return a hash:

  response = request.get
  response.to_hash
  #=> {'getSearchKeywordsRecommendationResponse' => {'xmnls' => 'http://www.ebay.com/marketplace/search/v1/services', 'ack' => 'Success', 'version' => '1.9.0', 'keywords' => 'harry potter'}}

Contributing

  1. Fork it ( http://github.com/rclosner/agent_cooper/fork )
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request
Something went wrong with that request. Please try again.