diff options
| author | Sam Wilkins <samwilkins333@gmail.com> | 2020-05-14 01:29:19 -0700 |
|---|---|---|
| committer | Sam Wilkins <samwilkins333@gmail.com> | 2020-05-14 01:29:19 -0700 |
| commit | f9385130fe297088754d4ce46d6c318c8be2121d (patch) | |
| tree | 0435585464fb614e6126f59136d64bcb87cb65bd /src/server/apis/youtube/youtubeApiSample.js | |
| parent | 26e94812b02e178ead5d5be7cfe5bf73e92ac875 (diff) | |
server side restructure, some documentation to accompany new wiki overview entry
Diffstat (limited to 'src/server/apis/youtube/youtubeApiSample.js')
| -rw-r--r-- | src/server/apis/youtube/youtubeApiSample.js | 22 |
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 + }); +}; /** |
