list method
Lists message pins in a space.
Users can pin important messages in spaces for easy access. For more information, see Pin or unpin a conversation in Google Chat. Requires user authentication with one of the following authorization scopes:
https://www.googleapis.com/auth/chat.spaces.pins.readonly-https://www.googleapis.com/auth/chat.spaces.pins-https://www.googleapis.com/auth/chat.spaces.readonly-https://www.googleapis.com/auth/chat.spaces
Request parameters:
parent - Required. The parent space which owns the collection of pinned
items Format: spaces/{space}
Value must have pattern ^spaces/\[^/\]+$.
pageSize - Optional. The maximum number of message pins returned. The
service might return fewer messages than this value. The maximum value is
100. If you use a value more than 100, it's automatically changed to 100.
If unspecified, at most 100 message pins will be returned. Negative values
return an INVALID_ARGUMENT error.
pageToken - Optional. A page token received from a previous list message
pins call. Provide this parameter to retrieve the subsequent page. When
paginating, all other parameters provided should match the call that
provided the page token. Passing different values to the other parameters
might lead to unexpected results.
$fields - Selector specifying which fields to include in a partial
response.
Completes with a ListMessagePinsResponse.
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<ListMessagePinsResponse> list(
core.String parent, {
core.int? pageSize,
core.String? pageToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'pageSize': ?pageSize == null ? null : ['${pageSize}'],
'pageToken': ?pageToken == null ? null : [pageToken],
'fields': ?$fields == null ? null : [$fields],
};
final url_ = 'v1/' + core.Uri.encodeFull('$parent') + '/messagePins';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return ListMessagePinsResponse.fromJson(
response_ as core.Map<core.String, core.dynamic>,
);
}