purse.io

1.1.3 • Public • Published

purse.io NPM Version node Dependency Status JavaScript Style Guide

Node.js unofficial client to Purse.io API

Right now v1 API are supported.

Install

npm install --save purse.io

Usage

const Purse = require('purse.io')
let purse = new Purse()
 
purse.limit(25)
  .offset(0)
  .country('UK')
  .amount(null)
  .hide(null)
  .fetch()
    .then(console.log)
    .catch(console.error)
 
// OR
 
purse({
  limit: 25,
  offset: 0,
  country: 'UK', // if none specified, offers are mixed
  amount: '0.5-1',
  hide: null
}).fetch()
  .then(console.log)
  .catch(console.error)
 

Methods

  • fetch(): Get Purse.io offers and return a Promise with the result.
  • fetchRates(): Get Purse.io currency rates. It returns a Promise.
  • getCountries(): Get list of supported countries.
  • getLimits(): Get supported limits.
  • version(): Get API version.

Debug

To enable debug set the env var DEBUG=purse.io

Author

Rocco Musolino (@roccomuso)

License

MIT

Package Sidebar

Install

npm i purse.io

Weekly Downloads

0

Version

1.1.3

License

MIT

Unpacked Size

6.81 kB

Total Files

8

Last publish

Collaborators

  • roccomuso