fetch-quote
v1.0.0
Published
Fetch daily quote from http://www.brainyquote.com
Downloads
11
Maintainers
Readme
brainquote-api
Fetch daily quote from http://www.brainyquote.com
Install
$ npm install fetch-quote --save
Usage
var quote = require('fetch-quote');
quote.get('funny', function (err, result) {
if (err) {
console.log(err);
}
if (result) {
console.log(result.quote); // the quote content
console.log(result.author); // the quote author
console.log(result.url); // the author's link
}
});
API
quote.get(type, callback)
type: the quote type, one of the following:
'today'
'love'
'funny'
'art'
'nature'
callback: callback function with the quote result function (err, result) { }
.
quote.get(callback)
Equal to quote.get('today', callback)
Contributing
Pull requests and stars are highly welcome.
For bugs and feature requests, please create an issue.