Socket
Socket
Sign inDemoInstall

qebayapi

Package Overview
Dependencies
22
Maintainers
1
Versions
3
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    qebayapi

promise based ebay trading api


Version published
Weekly downloads
6
increased by200%
Maintainers
1
Install size
4.89 MB
Created
Weekly downloads
 

Readme

Source

qebayapi

Promise oriented ebay api interface. Trading API.

eBay Trading API support xml and soap. This implementation use xml interface. It is almost asynchronous via Kriskoval's Q implemenation of promise.

Just one call now.

var ebayapi = require("qebayapi");

var options = {appName: '...','appCert':'...','devName':'...','callname':'GetItem','requestJSON':{'ItemID':'341341341'}, parseMode: 'json' };

ebayapi.TradingApi(options)
.then(function(response) {
  console.log(response.response.Ack);
  console.log('response': response.response);
});

It use q-io, so it is almost asynchronous, something could be improved in this field for request xml creation phase.

Code improvements

Separate concerns:

  1. request creation in its own class, then use strategy pattern: what is rMode (request mode)? 'json', 'xmlNode', 'xmlString' and ... how to extend it? function or {preparse:function(opts), create:function(opts), createHeaders: function(opts) }
  2. parse response: parseMode == 'json' or ... function(opts)

Rationale:

  • testing: make ebayXml2JsonParse testable
  • improving api. i.e. callname based options

Keywords

FAQs

Last updated on 23 Jun 2014

Did you know?

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc