public LastNedSpreadsheetFraGoogleDrive ( string documentId ) : Task |
||
documentId | string | |
리턴 | Task |
public async void ImportFrom_GoogleDocs() { var excelImport = RestApiApplication.CreateContainer().Resolve<Repository.Import.ExcelImport>(); var downloader = new GoogleDriveDownloader(); var documentId = Environment.GetEnvironmentVariable("BBR_GoogleDocId", EnvironmentVariableTarget.User); if(string.IsNullOrEmpty(documentId)) Assert.Fail("Cannot import if documentId is not set in environment variable"); var content = await downloader.LastNedSpreadsheetFraGoogleDrive(documentId); excelImport.LesInn(content); }
public async Task<IHttpActionResult> ConfigureFromGoogleDrive(string documentId) { var downloader = new GoogleDriveDownloader(); var content = await downloader.LastNedSpreadsheetFraGoogleDrive(documentId); _excelImport.LesInn(content); ClearCaching(); return Ok(); }