Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
A Ruby wrapper to the eBay Web Services API
Ruby
branch: master

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.