-
Notifications
You must be signed in to change notification settings - Fork 5
Expand file tree
/
Copy pathtest.js
More file actions
42 lines (30 loc) · 1.21 KB
/
test.js
File metadata and controls
42 lines (30 loc) · 1.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
const Procyon = require('./procyon')
async function main() {
var procyon1 = new Procyon({
className: 'actxxress'
})
var procyon2 = new Procyon({
className: 'movixxez'
})
/* Actors */
await procyon1.liked('gary', 'Jim Carrey')
await procyon1.liked('gary', 'Keanu Reeves')
await procyon1.liked('gary', 'Asa Akira')
await procyon1.liked('gary', 'Riley Reid')
await procyon1.disliked('gary', 'Sylvester Stallone')
await procyon1.liked('pete', 'Asa Akira')
await procyon1.liked('pete', 'Jim Carrey')
await procyon1.disliked('pete', 'Hillary Duff')
/* Movies */
await procyon2.liked('gary', 'The Matrix')
await procyon2.liked('gary', 'John Wick')
await procyon2.disliked('gary', 'Titanic')
await procyon2.liked('pete', 'John Wick')
await procyon2.liked('pete', 'Hunger Games')
await procyon2.liked('pete', 'Wall-E')
await procyon2.disliked('pete', 'Titanic')
let recommendations_actors = await procyon1.recommendFor('pete', 10)
let recommendations_movies = await procyon2.recommendFor('gary', 10)
console.log({ recommendations_actors, recommendations_movies })
}
main().then(console.log).catch(console.error)