コード例 #1
0
        public async Task <YouTubeService> InitializeServiceAsync()
        {
            UserCredential credential = await gcm.LoadUserCredentialsAsync();

            return(new YouTubeService(new YouTubeService.Initializer {
                HttpClientInitializer = credential,
                ApplicationName = "Auto Video Meta Localize",
            }));
        }
コード例 #2
0
        public async Task <YouTubeService> InitializeServiceAsync(string userCredentialsKey)
        {
            UserCredential credential = await gcm.LoadUserCredentialsAsync(userCredentialsKey);

            return(new YouTubeService(new BaseClientService.Initializer {
                HttpClientInitializer = credential,
                ApplicationName = ApplicationValues.NAME,
            }));
        }
        public async Task <TranslationServiceClient> InitializeServiceAsync()
        {
            UserCredential credential = await gcm.LoadUserCredentialsAsync();

            TranslationServiceClientBuilder builder = new TranslationServiceClientBuilder {
                TokenAccessMethod = credential.GetAccessTokenForRequestAsync,
            };

            return(await builder.BuildAsync());
        }