bored
v1.0.0
Published
Wrapper for the Bored API
Downloads
5
Readme
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