uploadbundle method

Future<InternalAppSharingArtifact> uploadbundle(
  1. String packageName, {
  2. String? $fields,
  3. UploadOptions uploadOptions = commons.UploadOptions.defaultOptions,
  4. Media? uploadMedia,
})

Uploads an app bundle to internal app sharing.

If you are using the Google API client libraries, please increase the timeout of the http request before calling this endpoint (a timeout of 2 minutes is recommended). See Timeouts and Errors for an example in java.

Request parameters:

packageName - Package name of the app.

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

uploadMedia - The media to upload.

uploadOptions - Options for the media upload. Streaming Media without the length being known ahead of time is only supported via resumable uploads.

Completes with a InternalAppSharingArtifact.

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<InternalAppSharingArtifact> uploadbundle(
  core.String packageName, {
  core.String? $fields,
  commons.UploadOptions uploadOptions = commons.UploadOptions.defaultOptions,
  commons.Media? uploadMedia,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    if ($fields != null) 'fields': [$fields],
  };

  core.String url_;
  if (uploadMedia == null) {
    url_ = 'androidpublisher/v3/applications/internalappsharing/' +
        commons.escapeVariable('$packageName') +
        '/artifacts/bundle';
  } else if (uploadOptions is commons.ResumableUploadOptions) {
    url_ =
        '/resumable/upload/androidpublisher/v3/applications/internalappsharing/' +
            commons.escapeVariable('$packageName') +
            '/artifacts/bundle';
  } else {
    url_ = '/upload/androidpublisher/v3/applications/internalappsharing/' +
        commons.escapeVariable('$packageName') +
        '/artifacts/bundle';
  }

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