recommenderir
v1.0.5
Published
The official nodejs api from recommender.ir
Downloads
3
Maintainers
Readme
recommenderir
recommenderir
is the official nodejs api from recommender.ir
Installation
npm i recommenderir
Usage
First, please enter your recommender.ir service address as shown below:
const recommender = require('recommenderir')
var url = "http://127.0.0.1:1234" // recommender.ir service address
recommender.setUrl(url)
Then, call available methods which is exists in Methods section. For example:
var userID = 1 // must be integer
var itemID = 'node-123' // must be string
var value = 10 // must be between 0 and 255
var callback = function (error, response, body) {
if (!error && response.statusCode == 200) {
// Do what you want
console.log(body)
}
}
recommender.ingest(userID, itemID, value, callback)
/********** OR **********/
var result = recommender.ingest(userID, itemID, value)
console.log(result)
Note: You can use this package for sync or async purposes. So, if no callback is passed, results will be returned.
Documents
For more information about methods and usage, please visit Wiki page.
Methods
- ingest
- ingestComment
- allItems
- allUsers
- forget
- forgetList
- remember
- itemLocationAdd
- itemLocationList
- similarity
- recommend
- recommendToGroup
- recommendToNewcomer
- termItemAdd
- termItemList
- termItemRemove
- termRecommend
- termBasedRecommend
- termBasedRecommendInclusive
- termBasedMostPopularItems
- termBasedMostPopularItemsInclusive
- termBasedSimilarity
- termBasedSimilarityInclusive
- luckyUser
- trendShortTime
- trendMidTime
- trendLongTime
Contributing
Pull requests are welcome.