Skip to content

backbone-youtube#117

Open
hkn8 wants to merge 2 commits intoprojectshft:masterfrom
hkn8:master
Open

backbone-youtube#117
hkn8 wants to merge 2 commits intoprojectshft:masterfrom
hkn8:master

Conversation

@hkn8
Copy link

@hkn8 hkn8 commented Mar 22, 2022

No description provided.

Copy link

@elbaumpj elbaumpj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good work! A few small suggestions to keep in mind for the future :)

'keyup #search-query': 'handleEnterKey',
},

results: `https://www.googleapis.com/youtube/v3/search?part=snippet&maxResults=5&type=video&videoEmbeddable=true&key=AIzaSyBKNZGIlCDmF6OqxU4eU4NsIcvV5Lx1SCw&q=`,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This works fine; you could also search on the collection if you wanted.

/* eslint-disable no-plusplus */
/* eslint-disable object-shorthand */

var VideosModel = Backbone.Model.extend({

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would call this Video (singular) model; a nit pick, but something to keep in mind.

defaults: function () {
return {
videos: new VideosCollection(),
videoResult: null,

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I would possibly call this something like selectedVideo

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants