revokePermissionById method

Future<bool> revokePermissionById(
  1. String id
)

Revokes permission by id.

id - permission id to remove.

Returns true in case of success.

Throws Exception if GSheets's scopes does not include DriveScope. Throws GSheetsException if DriveScope is not configured.

Implementation

Future<bool> revokePermissionById(String id) async {
  final response = await _client.delete(
    '$_filesEndpoint$id/permissions'.toUri(),
  );
  checkResponse(response);
  return response.statusCode == 204;
}