aboutsummaryrefslogtreecommitdiff
path: root/src/server/youtubeApi/youtubeApiSample.js
diff options
context:
space:
mode:
authorMohammad Amoush <mohammad_amoush@brown.edu>2019-06-27 12:55:31 -0400
committerMohammad Amoush <mohammad_amoush@brown.edu>2019-06-27 12:55:31 -0400
commitf31c0d97f9f59371d90d1396469aa9569933fb0d (patch)
tree5a64328ef6361bda1237e5588db395d698f1f210 /src/server/youtubeApi/youtubeApiSample.js
parent21bc14319013e4757ca24f56a685b7d75eaa259a (diff)
Youtube Results Showing as List Implemented
Diffstat (limited to 'src/server/youtubeApi/youtubeApiSample.js')
-rw-r--r--src/server/youtubeApi/youtubeApiSample.js5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/server/youtubeApi/youtubeApiSample.js b/src/server/youtubeApi/youtubeApiSample.js
index cd2e89cae..e95f99015 100644
--- a/src/server/youtubeApi/youtubeApiSample.js
+++ b/src/server/youtubeApi/youtubeApiSample.js
@@ -29,8 +29,8 @@ module.exports.authorizedGetChannel = (apiKey) => {
authorize(JSON.parse(apiKey), getChannel);
}
-module.exports.authorizedGetVideos = (apiKey, userInput) => {
- authorize(JSON.parse(apiKey), getSampleVideos, { userInput: userInput });
+module.exports.authorizedGetVideos = (apiKey, userInput, callBack) => {
+ authorize(JSON.parse(apiKey), getSampleVideos, { userInput: userInput, callBack: callBack });
}
@@ -154,5 +154,6 @@ function getSampleVideos(auth, args) {
}
let videos = response.data.items;
console.log('Videos found: ' + videos[0].id.videoId, " ", videos[0].snippet.title);
+ args.callBack(videos);
});
} \ No newline at end of file