-
Notifications
You must be signed in to change notification settings - Fork 132
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
like dislike not working, recommendationFor returns empty array. #40
Comments
Yeah. liked() and disliked() seem to require a callback, even if some examples don't have one... Examples from the page (throw error about callback no being a function in the current version): They work like this instead: recommendFor() seems to work, but it might not work right after liked() and disliked() due to their asynchronous nature. You could use the callbacks to chain them one after another. |
It appears the recommendation set is only updated on a call to liked(). This is a problem when importing data because the first few users will have no recommendations (and early users will have incorrect recommendations). I have resolved this by calling liked() again (after the entire import) before calling recommendFor. |
@brendonboshell Yep, that is problem. I'm going to add an options parameter into liked / disliked so that you can import data quicker by not updating recommendations. And then a separate method to fire the update sequence. |
@nicholas-ooi Updated the readme to account for the async nature of the calls. Also it supports ES6 promises now :D |
as title mentioned.
The text was updated successfully, but these errors were encountered: