UNPKG

@azteam/google-api

Version:

N/A

28 lines (22 loc) 817 B
import GoogleOAuth2API from './GoogleOAuth2API'; import {YOUTUBE_ACCOUNT_SCOPE, YOUTUBE_VIDEO_SCOPE} from './scope'; // const YOUTUBE_ENDPOINT = ''; class YoutubeAPI extends GoogleOAuth2API { constructor(accountType, credential, options = {}) { super( accountType, { ...credential, scope: encodeURIComponent([YOUTUBE_VIDEO_SCOPE, YOUTUBE_ACCOUNT_SCOPE].join(' ')), }, options ); } getAuthLink(redirectURI, state, arrayScope = [YOUTUBE_VIDEO_SCOPE, YOUTUBE_ACCOUNT_SCOPE]) { return super.getAuthLink(redirectURI, state, arrayScope); } async hasScope(arrayScope = [YOUTUBE_VIDEO_SCOPE, YOUTUBE_ACCOUNT_SCOPE]) { return super.hasScope(arrayScope); } } export default YoutubeAPI;