public ServiceModule(GoogleDriveUploadSettings settings, ILog log)
        {
            _settings = settings;
            _log      = log;

            _services = new ServiceCollection();
        }
Esempio n. 2
0
        public GoogleDriveService(GoogleDriveUploadSettings settings, ILog log)
        {
            _settings = settings;
            _log      = log;

            GoogleCredential credential = GoogleCredential.FromJson(JsonConvert.SerializeObject(settings.GoogleDriveApiKey)).CreateScoped(Scopes);

            service = new DriveService(new BaseClientService.Initializer()
            {
                HttpClientInitializer = credential,
                ApplicationName       = "Lykke GoogleDrive Upload",
            });
        }