get method

Future<Presentation> get(
  1. String presentationId, {
  2. String? commentsViewMode,
  3. String? $fields,
})

Gets the latest version of the specified presentation.

Request parameters:

presentationId - The ID of the presentation to retrieve. Value must have pattern ^\[^/\]+$.

commentsViewMode - The comments view mode to apply to the presentation. This allows viewing the presentation with comments omitted or included. If one is not specified, COMMENTS_VIEW_MODE_OMITTED is used. Possible string values are:

  • "COMMENTS_VIEW_MODE_UNSPECIFIED" : The CommentsViewMode is unspecified; COMMENTS_VIEW_MODE_OMITTED is applied.
  • "COMMENTS_VIEW_MODE_DEFAULT_FOR_CURRENT_ACCESS" : The CommentsViewMode applied to the returned presentation depends on the user's current access level. If the user only has view access, COMMENTS_VIEW_MODE_OMITTED is applied. Otherwise, COMMENTS_VIEW_MODE_INCLUDED is applied.
  • "COMMENTS_VIEW_MODE_OMITTED" : The returned presentation has comments omitted.
  • "COMMENTS_VIEW_MODE_INCLUDED" : The returned presentation has comments included. Requests to retrieve a presentation using this mode will return a 403 error if the user does not have permission to view comments.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Presentation.

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<Presentation> get(
  core.String presentationId, {
  core.String? commentsViewMode,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'commentsViewMode': ?commentsViewMode == null ? null : [commentsViewMode],
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ = 'v1/presentations/' + core.Uri.encodeFull('$presentationId');

  final response_ = await _requester.request(
    url_,
    'GET',
    queryParams: queryParams_,
  );
  return Presentation.fromJson(
    response_ as core.Map<core.String, core.dynamic>,
  );
}