@flike/recommend
v1.4.21
Published
Wrapper for the Flike Recommendation API.
Downloads
4
Maintainers
Readme
More information about Flike can be found here.
Installation
Install the @flike/recommend package:
npm install @flike/recommend
Quick Guide
Install the module as described in Installation.
Import the module into your code
import {Recommender} from '@flike/recommend
Instantiate the
Recommender
with your API key.const recommender = new Recommender(<your API key>);
Retrieve recommendations in real time:
const recs = await recommender.recommend("<user_id>", 6); console.log(recs); // { // items: [ // { // item_id: "eE8iqyS3nEYGMdSFVa4T", // probability: 0.4804032, // }, // { // item_id: "uItDAqQhm5MMXtJRGXUx", // probability: 0.1196371, // }, // { // item_id: "ZpJCKlbj7fglMhTzPFCQ", // probability: 0.041603, // }, // { // item_id: "YUrKof1INQJ2HMzWnVar", // probability: 0.024264, // }, // { // item_id: "mDSLnJEe37qEYsLpM2dG", // probability: 0.018669, // }, // ], // correlation_id: "cid-9461ba9d-856d-4d5e-b776-bb90e6eed35d", // }
Reference
Refer to the library reference for further documentation.