Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/roccomuso/purse.io
Node.js unofficial client to Purse.io API
https://github.com/roccomuso/purse.io
api client io js nodejs purse purse-io unofficial
Last synced: 29 days ago
JSON representation
Node.js unofficial client to Purse.io API
- Host: GitHub
- URL: https://github.com/roccomuso/purse.io
- Owner: roccomuso
- Created: 2017-11-25T19:24:53.000Z (almost 7 years ago)
- Default Branch: master
- Last Pushed: 2023-10-02T19:48:33.000Z (about 1 year ago)
- Last Synced: 2024-10-14T04:23:18.558Z (about 1 month ago)
- Topics: api, client, io, js, nodejs, purse, purse-io, unofficial
- Language: JavaScript
- Size: 16.6 KB
- Stars: 6
- Watchers: 4
- Forks: 1
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# purse.io [![NPM Version](https://img.shields.io/npm/v/purse.io.svg)](https://www.npmjs.com/package/purse.io) ![node](https://img.shields.io/node/v/purse.io.svg) [![Dependency Status](https://david-dm.org/roccomuso/purse.io.png)](https://david-dm.org/roccomuso/purse.io) [![JavaScript Style Guide](https://img.shields.io/badge/code_style-standard-brightgreen.svg)](https://standardjs.com) [](https://github.com/roccomuso/purse.io)
> Node.js unofficial client to `Purse.io` API
Right now `v1` API are supported.
## Install
npm install --save purse.io
## Usage
```javascript
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](https://twitter.com/roccomuso))
# License
MIT