aboutsummaryrefslogtreecommitdiff
path: root/src/server/apis/youtube/youtubeApiSample.js
diff options
context:
space:
mode:
authorMelissa Zhang <mzhang19096@gmail.com>2020-05-15 19:10:07 -0700
committerMelissa Zhang <mzhang19096@gmail.com>2020-05-15 19:10:07 -0700
commit253d5efbbafe4a44c350fef7dda6d553a70a94c9 (patch)
treeb43a55e1efddc86e25df4bb7d90a99f3c7b52a17 /src/server/apis/youtube/youtubeApiSample.js
parent36c01920e3874e1484222a7012745b581405f67d (diff)
parent08b6bf8b51ab631c8cfe9c3e12bfb0ae2dd7b4c7 (diff)
merge with master
Diffstat (limited to 'src/server/apis/youtube/youtubeApiSample.js')
-rw-r--r--src/server/apis/youtube/youtubeApiSample.js22
1 files changed, 15 insertions, 7 deletions
diff --git a/src/server/apis/youtube/youtubeApiSample.js b/src/server/apis/youtube/youtubeApiSample.js
index 50b3c7b38..d535bd9ff 100644
--- a/src/server/apis/youtube/youtubeApiSample.js
+++ b/src/server/apis/youtube/youtubeApiSample.js
@@ -1,6 +1,8 @@
const fs = require('fs');
const readline = require('readline');
-const { google } = require('googleapis');
+const {
+ google
+} = require('googleapis');
const OAuth2 = google.auth.OAuth2;
@@ -19,21 +21,27 @@ module.exports.readApiKey = (callback) => {
}
callback(content);
});
-}
+};
module.exports.authorizedGetChannel = (apiKey) => {
//this didnt get called
// Authorize a client with the loaded credentials, then call the YouTube API.
authorize(JSON.parse(apiKey), getChannel);
-}
+};
module.exports.authorizedGetVideos = (apiKey, userInput, callBack) => {
- authorize(JSON.parse(apiKey), getVideos, { userInput: userInput, callBack: callBack });
-}
+ authorize(JSON.parse(apiKey), getVideos, {
+ userInput: userInput,
+ callBack: callBack
+ });
+};
module.exports.authorizedGetVideoDetails = (apiKey, videoIds, callBack) => {
- authorize(JSON.parse(apiKey), getVideoDetails, { videoIds: videoIds, callBack: callBack });
-}
+ authorize(JSON.parse(apiKey), getVideoDetails, {
+ videoIds: videoIds,
+ callBack: callBack
+ });
+};
/**