I want to update the permission of some files in google drive using google drive api v2. everything works fine, file list, permission insert, .... only with permission update i have a problem but only if i want to change the owner!
There is a parameter called "transferOwnership", if i set this on https://developers.google.com/drive/v2/reference/permissions/update "try it" to true everything works fine but i dont know / can finde any way how to set this parameter in my code!?
var permissionresult = UpdatePermission(service, "fileid", "permissionid", "owner");
public static Permission UpdatePermission(DriveService service, String fileId,
String permissionId, String newRole)
{
try
{
// First retrieve the permission from the API.
Permission permission = service.Permissions.Get(fileId, permissionId).Execute();
permission.Role = newRole;
return service.Permissions.Update(permission, fileId, permissionId).Execute();
}
catch (Exception e)
{
Console.WriteLine("An error occurred: " + e.Message);
}
return null;
}
Hope someone can help me, thats the last thing i need to complete my app.
thanks markus