Skip to content
API wrapper for Barter.vg
Branch: master
Clone or download
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Type Name Latest commit message Commit time
Failed to load latest commit information.
lib
test
.gitignore
.travis.yml
README.md
index.js
package-lock.json
package.json

README.md

libbarter

API wrapper for Barter.vg

Build Status codecov

Documentation

Example

const Barter = require("./index.js");

(async () => {
  let barter = new Barter();

  let offers = await barter.getOffers("a0");
  let firstOffer = await offers[Object.keys(offers)[0]].getFullOffer();
  let firstItem = firstOffer.items.to[0];
  let firstFullItem = await firstItem.getFullItem();
  
  console.log(firstFullItem);
})();

Tests

libbarter comes with a test suite powered by jest that evaluates many features.

git clone https://github.com/antigravities/libbarter
cd libbarter
npm i --dev
npm test

Grab a cup of tea, tests may take up to 2 minutes to complete as GlobalOfferCollector is covered.

License

LGPL v3

You can’t perform that action at this time.