Skip to content

rebbix/predictionio-node

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

PredictionIO Client

Installation

Configuration

Set up PredictionIO credentials

var prediction = require('predictionio');
prediction.config.APP_KEY = '...';
prediction.config.APP_URL = 'http://localhost:8000' // default

Usage

Manage users

var prediction = require('predictionio');
prediction.user.getUser(userId, customOptions, callback);
prediction.user.postUser(userId, customOptions, callback);
prediction.user.deleteUser(userId, customOptions, callback);

Manage items

var prediction = require('predictionio');
prediction.item.getItem(itemId, customOptions, callback);
prediction.item.postItem(itemId, customOptions, callback);
prediction.item.deleteItem(itemId, customOptions, callback);

Create actions

var prediction = require('predictionio');
prediction.action.rate(userId, itemId, rate, customOptions, callback);
prediction.action.like(userId, itemId, customOptions, callback);
prediction.action.dislike(userId, itemId, customOptions, callback);
prediction.action.view(userId, itemId, customOptions, callback);
prediction.action.conversion(userId, itemId, customOptions, callback);

Fetch similar/recommended items

var prediction = require('predictionio');
prediction.engine.similarItems(engineName, itemId, maxNumber, customOptions, callback);
prediction.engine.recommendedItems(engineName, userId, maxNumber, customOptions, callback);

About

PredictionIO client for Node.js

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published