get method
Returns a rubric.
This method returns the following error codes: * PERMISSION_DENIED
for
access errors. * INVALID_ARGUMENT
if the request is malformed. *
NOT_FOUND
if the requested course, course work, or rubric doesn't exist
or if the user doesn't have access to the corresponding course work.
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 Rubric.
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<Rubric> get(
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_,
'GET',
queryParams: queryParams_,
);
return Rubric.fromJson(response_ as core.Map<core.String, core.dynamic>);
}