An API wrapper for qdb.us.
Looking for a REST API? See qdb-rest-api
npm install qdb-api
const qdb = require('qdb-api')
- Get a random quote
- Get the latest quote
- Get specific quote by it's id
- Search for a quote
qdb.random()
.then(quote => {
console.log(quote);
})
.catch(reason => {
console.log(reason);
});
qdb.latest()
.then(quote => {
console.log(quote);
})
.catch(reason => {
console.log(reason);
});
qdb.get(4680)
.then(quote => {
console.log(quote);
})
.catch(reason => {
console.log(reason);
});
qdb.search('tom')
.then(quotes => {
quotes.forEach(quote => {
console.log(quote);
});
})
.catch(reason => {
console.log(reason);
});
Please note that is an unofficial API.