
Security News
Django Joins curl in Pushing Back on AI Slop Security Reports
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
qdb-api-plus
Advanced tools
A better API wrapper for Quote Database. Fork of qdb-api.
Looking for a REST API? See qdb-rest-api
npm install qdb-api-plus
const qdb = require('qdb-api-plus')
axios
latestID
and randomID
Example:
qdb.random()
.then(quote => {
console.log(quote.id);
console.log(quote.score);
console.log(quote.text);
})
.catch(reason => {
console.log(reason);
});
Example:
qdb.randomID()
.then(id => {
console.log(id);
})
.catch(reason => {
console.log(reason);
});
Example:
qdb.latest()
.then(quote => {
console.log(quote.id);
console.log(quote.score);
console.log(quote.text);
})
.catch(reason => {
console.log(reason);
});
Example:
qdb.latestID()
.then(id => {
console.log(id);
})
.catch(reason => {
console.log(reason);
});
Parameters
ID number
Example:
qdb.get(4680)
.then(quote => {
console.log(quote.id);
console.log(quote.score);
console.log(quote.text);
})
.catch(reason => {
console.log(reason);
});
Parameters
Search string
Sort by
- 0
for score, 1
for numberNumber of results
- 1
, 10
, 25
, 50
, 75
, or 100
Returns a quote if Number of results
is 1, and an array of quotes otherwise
Example:
qdb.search('tom', 0, 10)
.then(quotes => {
quotes.forEach(quote => {
console.log(quote.id);
console.log(quote.score);
console.log(quote.text);
});
})
.catch(reason => {
console.log(reason);
});
First, the program gets a specific bash.org website:
`http://bash.org/?${id}` //Get specific ID
'http://bash.org/?latest' //Latest quote/ID
'http://bash.org/?random' //Random quote/ID
`http://bash.org/?search=${query}&sort=${sort}&show=${count}` //Search
Then, it uses cheerio
to scrape the page for the quote text, the votes, and the ID.
Please note that is an unofficial API.
FAQs
A better API wrapper for Quote Database
The npm package qdb-api-plus receives a total of 5 weekly downloads. As such, qdb-api-plus popularity was classified as not popular.
We found that qdb-api-plus demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Django has updated its security policies to reject AI-generated vulnerability reports that include fabricated or unverifiable content.
Security News
ECMAScript 2025 introduces Iterator Helpers, Set methods, JSON modules, and more in its latest spec update approved by Ecma in June 2025.
Security News
A new Node.js homepage button linking to paid support for EOL versions has sparked a heated discussion among contributors and the wider community.