updateappstorehostedapp method

Future<SafetyLabelsUpdateResponse> updateappstorehostedapp(
  1. UpdateAppStoreHostedAppRequest request,
  2. String appStorePackageName, {
  3. String? $fields,
})

Updates details for an app hosted on an app store.

Use this to provide details for a new app, or to update details for an existing app. The update will be sent for review immediately after creation.

request - The metadata request object.

Request parameters:

appStorePackageName - Required. Package name of the third-party app store.

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

Completes with a UpdateAppStoreHostedAppResponse.

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<UpdateAppStoreHostedAppResponse> updateappstorehostedapp(
  UpdateAppStoreHostedAppRequest request,
  core.String appStorePackageName, {
  core.String? $fields,
}) async {
  final body_ = convert.json.encode(request);
  final queryParams_ = <core.String, core.List<core.String>>{
    'fields': ?$fields == null ? null : [$fields],
  };

  final url_ =
      'androidpublisher/v3/appstore/' +
      commons.escapeVariable('$appStorePackageName') +
      '/apps:update';

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