delete method
Deletes a rubric.
The requesting user and course owner must have rubrics creation
capabilities. For details, see
licensing requirements.
This request must be made by the Google Cloud console of the
OAuth client ID used to
create the corresponding rubric. This method returns the following error
codes: * PERMISSION_DENIED
if the requesting developer project didn't
create the corresponding rubric, or if the requesting user isn't permitted
to delete the requested rubric. * NOT_FOUND
if no rubric exists with the
requested ID or the user does not have access to the course, course work,
or rubric. * INVALID_ARGUMENT
if grading has already started on the
rubric.
Request parameters:
courseId
- Required. Identifier of the course.
courseWorkId
- Required. Identifier of the course work.
id
- Required. Identifier of the rubric.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Empty.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<Empty> delete(
core.String courseId,
core.String courseWorkId,
core.String id, {
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v1/courses/' +
commons.escapeVariable('$courseId') +
'/courseWork/' +
commons.escapeVariable('$courseWorkId') +
'/rubrics/' +
commons.escapeVariable('$id');
final response_ = await _requester.request(
url_,
'DELETE',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}