list method
Lists post and user info pairs.
Request parameters:
userId
- null
blogId
- null
endDate
- null
fetchBodies
- null
labels
- null
maxResults
- null
orderBy
- null
Possible string values are:
- "ORDER_BY_UNSPECIFIED"
- "PUBLISHED"
- "UPDATED"
pageToken
- null
startDate
- null
status
- null
view
- null
Possible string values are:
- "VIEW_TYPE_UNSPECIFIED"
- "READER"
- "AUTHOR"
- "ADMIN"
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a PostUserInfosList.
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<PostUserInfosList> list(
core.String userId,
core.String blogId, {
core.String? endDate,
core.bool? fetchBodies,
core.String? labels,
core.int? maxResults,
core.String? orderBy,
core.String? pageToken,
core.String? startDate,
core.List<core.String>? status,
core.String? view,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (endDate != null) 'endDate': [endDate],
if (fetchBodies != null) 'fetchBodies': ['${fetchBodies}'],
if (labels != null) 'labels': [labels],
if (maxResults != null) 'maxResults': ['${maxResults}'],
if (orderBy != null) 'orderBy': [orderBy],
if (pageToken != null) 'pageToken': [pageToken],
if (startDate != null) 'startDate': [startDate],
if (status != null) 'status': status,
if (view != null) 'view': [view],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'v3/users/' +
commons.escapeVariable('$userId') +
'/blogs/' +
commons.escapeVariable('$blogId') +
'/posts';
final response_ = await _requester.request(
url_,
'GET',
queryParams: queryParams_,
);
return PostUserInfosList.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}