File tree Expand file tree Collapse file tree 2 files changed +2
-26
lines changed
packages/recommend/src/types Expand file tree Collapse file tree 2 files changed +2
-26
lines changed Original file line number Diff line number Diff line change 11import { RecommendationsQuery } from './RecommendationsQuery' ;
22
3- export type RecommendedForYouQuery = Omit < RecommendationsQuery , 'model' | 'objectID' > & {
4- /**
5- * A `userToken` to personalise recommendations.
6- */
7- readonly userToken : string ;
8- } ;
3+ export type RecommendedForYouQuery = Omit < RecommendationsQuery , 'model' | 'objectID' > ;
Original file line number Diff line number Diff line change 11<!DOCTYPE html>
22< html >
33 < head >
4- <!-- TODO reset before opening PR -- >
4+ < script src =" /playground/browser/algoliasearch.umd.js " > </ script >
55 < script src ="/playground/browser/recommend.umd.js "> </ script >
6-
7- < script >
8- const recommend = window [ '@algolia/recommend' ] ;
9- const client = recommend ( 'betaJ7GCETGTCW' , '4cf66002c945b397d9041ca70089d3cd' ) ;
10-
11- client
12- . getRecommendedForYou ( [
13- {
14- indexName : 'airbnb' ,
15- userToken : 'user_token_1' ,
16- } ,
17- ] )
18- . then ( ( { results } ) => {
19- console . log ( results [ 0 ] ) ;
20- } )
21- . catch ( err => {
22- console . error ( err ) ;
23- } ) ;
24- </ script >
256 </ head >
267 < body > </ body >
278</ html >
You can’t perform that action at this time.
0 commit comments