GithubHelp home page GithubHelp logo

ebay_client's Introduction

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!

ebay_client's People

Contributors

cice avatar mytram avatar ledwards avatar

Watchers

James Cloos avatar

Forkers

railsmechanic

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.