# quotefm-node **Repository Path**: mirrors_Gottox/quotefm-node ## Basic Information - **Project Name**: quotefm-node - **Description**: The Quote.fm API for node - **Primary Language**: Unknown - **License**: MIT - **Default Branch**: master - **Homepage**: None - **GVP Project**: No ## Statistics - **Stars**: 0 - **Forks**: 0 - **Created**: 2020-09-24 - **Last Updated**: 2026-03-22 ## Categories & Tags **Categories**: Uncategorized **Tags**: None ## README ## Example ``` javascript 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: ``` javascript 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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 * 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