permissions method
Returns Future list of Permission.
Requires SheetsApi.DriveScope.
Throws Exception if GSheets's scopes does not include DriveScope. Throws GSheetsException if DriveScope is not configured.
Implementation
Future<List<Permission>> permissions() async {
final response = await _client.get(
'$_filesEndpoint$id/permissions'.toUri(),
);
checkResponse(response);
return (jsonDecode(response.body)['items'] as List?)
?.map((json) => Permission._fromJson(json))
.toList() ??
<Permission>[];
}