GithubHelp home page GithubHelp logo

isabella232 / tap-ebay Goto Github PK

View Code? Open in Web Editor NEW

This project forked from singer-io/tap-ebay

0.0 0.0 0.0 41 KB

Singer.io tap for Ebay fulfillments

License: GNU Affero General Public License v3.0

Shell 6.24% Python 93.76%

tap-ebay's Introduction

tap-ebay

Author: Drew Banin ([email protected])

This is a Singer tap that produces JSON-formatted data following the Singer spec.

It:

  • Generates a catalog of available order data from the Ebay fulfillment API
  • Extracts the following resources:

Quick Start

  1. Install
git clone [email protected]:fishtown-analytics/tap-ebay.git
cd tap-ebay
pip install .
  1. Authentication

This tap calls the fulfillment API which requires a User access token.

In order to retrieve a User access token the service needs to:

  • use a refresh token (long-lived) and exchange it for an access token (short-lived)

This likely requires two Ebay accounts:

  • A seller account which owns the sales data,
  • A developer account which is used for applications to access the sales data.

In order to create a refresh token:

  • Seller account needs to grant permission to Developer account to use the API,
  • Developer account needs to exchange the authorization code for a refresh token.

Generating a refresh token

Read the documentation

  1. Obtain credentials to both Seller and Developer account.
  2. Go to eBay's Application Keys and note Cert ID (Client Secret).
  3. Sign in using Developer username and password.
  4. Go to the specified authorization url (see below) in your browser.
  5. Sign in using Seller username and password.
  6. Grant access by clicking Agree.
  7. After being redirected, copy the value of query param code.
  8. Execute: ./get-refresh-token.sh providing your credentials as arguments
  9. Copy refresh_token from the response and store it with the job configuration.

Example authorization url

https://auth.ebay.com/oauth2/authorize?client_id=<client_id>
    &response_type=code
    &redirect_uri=<redirect_uri>
    &scope=https://api.ebay.com/oauth/api_scope/sell.fulfillment.readonly

Note: It is critical that the scope provided in the config.json file matches the scope requested from this authorization url!

  1. Create the config file.

There is a template you can use at config.json.example, just copy it to config.json in the repo root and insert your credentials

  1. Run the application to generate a catalog.
tap-ebay -c config.json --discover > catalog.json
  1. Select the tables you'd like to replicate

Step 4 generates a a file called catalog.json that specifies all the available endpoints and fields. You'll need to open the file and select the ones you'd like to replicate. See the Singer guide on Catalog Format for more information on how tables are selected.

  1. Run it!
tap-ebay -c config.json --catalog catalog.json

Copyright © 2019 Stitch

tap-ebay's People

Contributors

drewbanin avatar kallan357 avatar kspeer825 avatar zachharris1 avatar

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.