list method
Returns all user settings for the authenticated user.
Request parameters:
maxResults
- Maximum number of entries returned on one result page. By
default the value is 100 entries. The page size can never be larger than
250 entries. Optional.
pageToken
- Token specifying which result page to return. Optional.
syncToken
- Token obtained from the nextSyncToken field returned on the
last page of results from the previous list request. It makes the result
of this list request contain only entries that have changed since then.
If the syncToken expires, the server will respond with a 410 GONE response
code and the client should clear its storage and perform a full
synchronization without any syncToken.
Learn more about incremental synchronization.
Optional. The default is to return all entries.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Settings.
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<Settings> list({
core.int? maxResults,
core.String? pageToken,
core.String? syncToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (maxResults != null) 'maxResults': ['${maxResults}'],
if (pageToken != null) 'pageToken': [pageToken],
if (syncToken != null) 'syncToken': [syncToken],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'users/me/settings';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return Settings.fromJson(response_ as core.Map<core.String, core.dynamic>);
}