Closed jstashh closed 5 years ago
As you said, using getVideos() is not so efficient in here. Instead of this, you can get random data using
AggregationPipeline.Stage.sample(sizeOf:1)
Check out getFeaturedVideos() inside APIClient class. You can use the same approach to get a random video, just by deleting the match stage.
I think it is better to just add a link to the footer for now and check if people using this page or not. What do you think?
@ahmetws thanks for the tips, yes I think the footer is suitable
For #6. I have a hunch that
getRandomVideo()
might be terribly inefficient. Should I be getting a list of video ids or equivalent and then get the video rather than always getting all the videosgetVideos()
or does it not make much difference?Also haven't added a button to call the endpoint, not sure where you wanted it. Top right?