reply method

Future<ReviewsReplyResponse> reply(
  1. ReviewsReplyRequest request,
  2. String packageName,
  3. String reviewId, {
  4. String? $fields,
})

Replies to a single review, or updates an existing reply.

request - The metadata request object.

Request parameters:

packageName - Package name of the app.

reviewId - Unique identifier for a review.

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

Completes with a ReviewsReplyResponse.

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<ReviewsReplyResponse> reply(
  ReviewsReplyRequest request,
  core.String packageName,
  core.String reviewId, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  final url_ = 'androidpublisher/v3/applications/' +
      commons.escapeVariable('$packageName') +
      '/reviews/' +
      commons.escapeVariable('$reviewId') +
      ':reply';

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