Skip to content

Commit

Permalink
Add video id to search results
Browse files Browse the repository at this point in the history
- Make the search results contain the video id.
  • Loading branch information
frankhale committed Jul 8, 2015
1 parent 94b99d1 commit f4cc33b
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions index.js
Expand Up @@ -73,6 +73,7 @@ module.exports = function (term, opts, cb) {

var findings = result.items.map(function (item) {
return {
id: item.id.videoId,
link: (item.id.kind === 'youtube#channel' ?
'https://www.youtube.com/channel/' + item.id.channelId :
'https://www.youtube.com/watch?v=' + item.id.videoId),
Expand Down

0 comments on commit f4cc33b

Please sign in to comment.