bored

1.0.0 • Public • Published

Bored API Wrapper

Wrapper for the Bored API

Install

$ npm install bored

Usage

const bored = require('bored');
 
bored.random().then(res => {
  console.log(res);
});
 
bored.find('3136036').then(res => {
  console.log(res);
});

Functions

random

Find a random activity with specified parameters

let bored = require('bored');
 
// You can use some or all of these fiends
let options = {
  type: , // ['education', 'recreational', 'social', 'diy', 'charity', 'cooking', 'relaxation', 'music', 'busywork']
  participants: , // [1, ...]
  price: , // [0.0, 1.0]
  minprice: , // [0.0, 1.0]
  maxprice: , // [0.0, 1.0]
  accessibility: , // [0.0, 1.0]
  minaccessibility: , // [0.0, 1.0]
  maxaccessibility: // [0.0, 1.0]
}
 
bored.random(options).then(res => {
  console.log(res);
});

find

Find a specific activity by its key

let bored = require('bored');
 
bored.find('9414706').then(res => {
  console.log(res);
});

Examples

See test.js for examples

License

MIT

Readme

Keywords

none

Package Sidebar

Install

npm i bored

Weekly Downloads

1

Version

1.0.0

License

MIT

Unpacked Size

3.58 kB

Total Files

5

Last publish

Collaborators

  • drewthoennes