coinpoet-ebay-client
npm i coinpoet-ebay-client

coinpoet-ebay-client

A JavaScript/TypeScript client for the eBay RESTful APIs

by CoinPoet

0.0.1 (see all)License:MITTypeScript:Not FoundCategories:Vanilla JavaScript eBay API
npm i coinpoet-ebay-client
Readme

coinpoet-ebay-client

npm version license Build Status JavaScript Style Guide

This is a client for the eBay RESTful APIs, especially the buy API.

Features & Benefits

  • A thin wrapper around the eBay RESTful APIs. No magic here.
  • Full type definitions via TypeScript with documentation from the eBay-provided YAML for intellisense and quick and accurate documentation.
  • Manages tokens with each request.
  • Tests included (these could be better)

Usage

Install with yarn add coinpoet-ebay-client

Then you can use it as follows:

const config = {
  "baseURL": "https://api.ebay.com",
  "clientID": "<your ebay client id from developer.ebay.com>",
  "clientSecret": "<your ebay secret from developer.ebay.com>",
  "redirectUrlName": "<your ebay redirect url name from developer.ebay.com>"
}

const buyApi = new BuyApi(config)
for await (let item of buyApi.search({ category_ids: [123]})) {
  console.log(item)
}

// Alternatively get one page of results at a time (and not depend on async iterators which may not be available for your version of node - check http://node.green/#ES2018-features-Asynchronous-Iterators)
let pageResult = await buyApi.searchPage({ category_ids: [123], offset, limit })

Contributing

Please submit pull requests (with tests passing in the build).

Downloads/wk

4

GitHub Stars

2

LAST COMMIT

4yrs ago

MAINTAINERS

1

CONTRIBUTORS

0

OPEN ISSUES

0

OPEN PRs

0
VersionTagPublished
0.0.1
latest
4yrs ago
No tutorials found
Add a tutorial