0.03
No commit activity in last 3 years
No release in over 3 years
Simple, lightweight eBay Trading API Client
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 1.0
~> 3.0
~> 0.0
~> 2.0

Runtime

< 5.0.0, >= 3.1.0
~> 2.0
 Project Readme

EbayClient

Simple, lightweight eBay Trading API Client.

Installation

Rails

Gemfile:

gem 'ebay_client', '~> 0.3.0'

config/ebay_client.yml:

development: &sandbox
  api_keys:
    - token: '<YOUR SANDBOX AUTHENTICATION TOKEN>'
      devid: '<YOUR SANDBOX DEV ID>'
      appid: '<YOUR SANDBOX APP ID>'
      certid: '<YOUR SANDBOX CERT ID>'

test:
  <<: *sandbox

production:
  api_keys:
    - token: '<YOUR LIVE AUTHENTICATION TOKEN>'
      devid: '<YOUR LIVE DEV ID>'
      appid: '<YOUR LIVE APP ID>'
      certid: '<YOUR LIVE CERT ID>'

Fire up your console!

Usage

Rails

e.g. rails console:

EbayClient.api.get_ebay_official_time!
# => {:timestamp=>Fri, 22 Nov 2013 12:31:02 +0000}

Notes

  • An overview of possible API calls can be found at the eBay Trading API docs
  • Names (Methods, Types, Members) are mapped from CamelCase <=> snake_case
  • eBay is mapped to ebay, i.e. GeteBayOfficialTime <=> get_ebay_official_time
  • For each call, there are 2 methods, with and without a bang (!), i.e.
    • get_ebay_official_time returns an EbayClient::Response instance, which contains the ack value, the payload and possibly errors
    • get_ebay_official_time! returns the payload as a Hash and raises an EbayClient::Response::Exception if the API returned an error.
  • You can specify an arbitrary amount of API key/tokens in your ebay_client.yml. On initialization, the EbayClient will randomly choose one of them. If you run out of API calls, it will automatically switch to another key.
  • You can set your secrets as ENV variables as the ebay_client.yml will be parsed by the ERB interpreter.
  • Pull requests and bug reports are welcome!