Socket
Socket
Sign inDemoInstall

qdb-api

Package Overview
Dependencies
17
Maintainers
1
Versions
4
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    qdb-api

An API wrapper for qdb.us


Version published
Weekly downloads
0
decreased by-100%
Maintainers
1
Created
Weekly downloads
 

Readme

Source

qdb-api

NPM FOSSA Status

An API wrapper for qdb.us.

Looking for a REST API? See qdb-rest-api

npm install qdb-api

const qdb = require('qdb-api')

APIs available

  • Get a random quote
  • Get the latest quote
  • Get specific quote by it's id
  • Search for a quote

Get a random quote

qdb.random()
	.then(quote => {
		console.log(quote);
	})
	.catch(reason => {
		console.log(reason);
	});

Get the latest quote

qdb.latest()
	.then(quote => {
		console.log(quote);
	})
	.catch(reason => {
		console.log(reason);
	});

Get a specific quote by it's id

qdb.get(4680)
	.then(quote => {
		console.log(quote);
	})
	.catch(reason => {
		console.log(reason);
	});

Search for a quote

qdb.search('tom')
	.then(quotes => {
		quotes.forEach(quote => {
			console.log(quote);
		});
	})
	.catch(reason => {
		console.log(reason);
	});

Disclaimer

Please note that is an unofficial API.

License

FOSSA Status

Keywords

FAQs

Last updated on 27 Jul 2018

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.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc