public static bool DestroyDrive() { var driveService = new OHDriveService(); var drives = driveService.GetAll().Result; var driveToDelete = drives.FirstOrDefault(x => x.Name == "oh-api-test"); return driveService.Destroy(driveToDelete.DriveID).Result; }
public static OHDrive SetDrive() { var driveService = new OHDriveService(); var driveOptions = new OHDriveOptions(); driveOptions.ClaimType = "exclusive"; driveOptions.Encryption = "none"; driveOptions.Tags = new[] { "newtest", "c-sharp-api-v2" }; var drives = driveService.GetAll().Result; var drive = drives.FirstOrDefault(x => x.Name == "oh-api-test"); return driveService.Set(drive.DriveID, drive.Name, 1073741824, driveOptions).Result; }
public static List<OHDrive> GetAllDrives() { var driveService = new OHDriveService(); return driveService.GetAll().Result; }