New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

quotefm

Package Overview
Dependencies
Maintainers
1
Versions
6
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

quotefm

a node implementation of the Quote.fm API

  • 0.1.0
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
3
decreased by-50%
Maintainers
1
Weekly downloads
 
Created
Source

Example

var Quotefm = require('quotefm').Quotefm;

var quotefm = new Quotefm();

quotefm.user("Gottox", function(err, user) {
	if(err)
		return console.log("Error occured " + err);
	console.log(user)
	quotefm.recommendationByUser(user.id, {page: 0}, function(err, obj) {
		if(err)
			return console.log("Error occured " + err);
		console.log(obj)
	})
});

Usage

Instantiate a new object with:

var Quotefm = require('quotefm').Quotefm;

var quotefm = new Quotefm();

Afterwards you can use the following method calls:

quotefm.recommendation(id, options, cb)

Queries /recommendation/get, see http://quote.fm/labs/documentation/recommendation/get

  • id: ID to query.
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.recommendationByArticle(id, options, cb)

Queries /recommendation/listByArticle, see http://quote.fm/labs/documentation/recommendation/listByArticle

  • id: ID or URL to query, determinated by type (typeof id === 'string' -> url; typeof id === 'number' -> id)
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.recommendationByUser(id, options, cb)

Queries /recommendation/listByArticle, see http://quote.fm/labs/documentation/recommendation/listByArticle

  • id: ID to query.
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.article(id, cb)

Queries /article/get, see http://quote.fm/labs/documentation/article/get

  • id: ID to query.
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.articleByPage(id, options, cb)

Queries /article/listByPage, see http://quote.fm/labs/documentation/article/listByPage

  • id: ID to query.
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.articleByCategories(ids, options, cb)

Queries /article/listByCategories, see http://quote.fm/labs/documentation/article/listByCategories

  • id: ID to query.
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.page(id, options, cb)

Queries /page/get, see http://quote.fm/labs/documentation/page/get

  • id: ID or Domain to query, determinated by type (typeof id === 'string' -> domain; typeof id === 'number' -> id)
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.user(id, options, cb)

Queries /user/get, see http://quote.fm/labs/documentation/user/get

  • id: ID or Username to query, determinated by type (typeof id === 'string' -> username; typeof id === 'number' -> id)
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.followers(id, options, cb)

Queries /user/listFollowers, see http://quote.fm/labs/documentation/user/listFollowers

  • id: ID or Username to query, determinated by type (typeof id === 'string' -> username; typeof id === 'number' -> id)
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.followings(id, options, cb)

Queries /user/listFollowings, see http://quote.fm/labs/documentation/user/listFollowings

  • id: ID or Username to query, determinated by type (typeof id === 'string' -> username; typeof id === 'number' -> id)
  • options: an object containing key value pairs for building the parameter list. optional
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.listPage(size, page, cb)

Queries /page/get, see http://quote.fm/labs/documentation/page/get

  • size: how many entries per page.
  • page: which page
  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

quotefm.listCategories(cb)

Queries /category/list, see http://quote.fm/labs/documentation/category/list

  • cb: a callback. will be called on result.
    function(err, obj)
    • err: defined when an error occured, otherwise undefined
    • obj: the actual resultobject, undefined on error

Keywords

FAQs

Package last updated on 24 Apr 2012

Did you know?

Socket

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
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc