get method
Gets the latest version of the specified page in the presentation.
Request parameters:
presentationId - The ID of the presentation to retrieve.
pageObjectId - The object ID of the page to retrieve.
commentsViewMode - The comments view mode to apply to the page. This
allows viewing the page 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 Page.
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<Page> get(
core.String presentationId,
core.String pageObjectId, {
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/' +
commons.escapeVariable('$presentationId') +
'/pages/' +
commons.escapeVariable('$pageObjectId');
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Page.fromJson(response_ as core.Map<core.String, core.dynamic>);
}