1.0.0 • Published 7 years ago

bored v1.0.0

Weekly downloads
3
License
MIT
Repository
github
Last release
7 years ago

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