quotes-goodreads
v0.0.8
Published
Easily get static quotes from Goodreads
Downloads
14
Maintainers
Readme
quotes-goodreads
Easily get access to Goodreads quotes. This is a static list, and doesn't make connection to the Goodreads website.
The Quotes Goodreads library exported as Node.js modules.
Installing
Using npm:
$ npm i --save quotes-goodreads
Usage
In Node.js:
// Load the module
const quotes = require('quotes-goodreads');
// Get a random Goodreads quote
console.log(quotes.getRandomStringQuote());
API
quotes.getRandomStringQuote()
Example: quotes.getRandomStringQuote();
Returns a random quote as String.
quotes.getRandomStringQuoteWithAuthor()
Example: quotes.getRandomStringQuoteWithAuthor();
Returns a random quote as string, with author's name also added.
quotes.getMostPopularQuotesString([number])
Example: quotes.getMostPopularQuotesString(2);
Gets the most popular quote, by rank. Ranking starts at 1. If no number is given, it responds with most popular quote.
quotes.getMostPopularQuotesStringWithAuthor([number])
Example: quotes.getMostPopularQuotesStringWithAuthor(2);
Same as getMostPopularQuotesString([number]), but author's name is also added.
quotes.quotesByAuthor(string)
Example: quotes.quotesByAuthor('Dr. Seuss');
Returns an array of quotes in string by the author. Substring of author's name also work.
Built With
- lodash - A modern JavaScript utility library delivering modularity, performance & extras.
- Dataset generated by going through Goodreads top quotes (total top 2997 quotes).
Authors
Written by sumanto