get method

Future<BlogUserInfo> get(
  1. String userId,
  2. String blogId, {
  3. int? maxPosts,
  4. String? $fields,
})

Gets one blog and user info pair by blog id and user id.

Request parameters:

userId - null

blogId - null

maxPosts - null

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

Completes with a BlogUserInfo.

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<BlogUserInfo> get(
  core.String userId,
  core.String blogId, {
  core.int? maxPosts,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if (maxPosts != null) 'maxPosts': ['${maxPosts}'],
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'v3/users/' +
      commons.escapeVariable('$userId') +
      '/blogs/' +
      commons.escapeVariable('$blogId');

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