JavaScript and TypeScript

Installation

npm install --save @flike/recommend

Quick Start

// import the library
import { Recommender } from "@flike/recommend";
// instantiate a recommender with your API key
// ATTENTION: when writing client-side code, e.g. a web app, don't use your secret API key, since it would
//            be exposed in the world-readable source of your application.
const recommender = new Recommender("<API Key>");

recommender.recommend("<user id>", 6).then(result => {
  console.log("Here's what <user id> might be interested in:", result.items)
})

Reference

Refer to the Library Reference for further documentation.


Did this page help you?