Class v1.StreetViewPublishServiceClient (0.1.0)

Publishes and connects user-contributed photos on Street View. v1

Package

@googlemaps/streetview-publish

Constructors

(constructor)(opts, gaxInstance)

constructor(opts?: ClientOptions, gaxInstance?: typeof gax | typeof gax.fallback);

Construct an instance of StreetViewPublishServiceClient.

Parameters
Name Description
opts ClientOptions
gaxInstance typeof gax | typeof fallback

: loaded instance of google-gax. Useful if you need to avoid loading the default gRPC version and want to use the fallback HTTP implementation. Load only fallback version and pass it to the constructor: ``` const gax = require('google-gax/build/src/fallback'); // avoids loading google-gax with gRPC const client = new StreetViewPublishServiceClient({fallback: true}, gax); ```

Properties

apiEndpoint

get apiEndpoint(): string;

The DNS address for this API service.

apiEndpoint

static get apiEndpoint(): string;

The DNS address for this API service - same as servicePath.

auth

auth: gax.GoogleAuth;

descriptors

descriptors: Descriptors;

innerApiCalls

innerApiCalls: {
        [name: string]: Function;
    };

operationsClient

operationsClient: gax.OperationsClient;

port

static get port(): number;

The port for this API service.

scopes

static get scopes(): string[];

The scopes needed to make gRPC calls for every method defined in this service.

servicePath

static get servicePath(): string;

The DNS address for this API service.

streetViewPublishServiceStub

streetViewPublishServiceStub?: Promise<{
        [name: string]: Function;
    }>;

universeDomain

get universeDomain(): string;

warn

warn: (code: string, message: string, warnType?: string) => void;

Methods

batchDeletePhotos(request, options)

batchDeletePhotos(request?: protos.google.streetview.publish.v1.IBatchDeletePhotosRequest, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IBatchDeletePhotosResponse,
        protos.google.streetview.publish.v1.IBatchDeletePhotosRequest | undefined,
        {} | undefined
    ]>;

Deletes a list of and their metadata.

Note that if fails, either critical fields are missing or there is an authentication error. Even if succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchDeletePhotosResponse.results. See for specific failures that can occur per photo.

Parameters
Name Description
request IBatchDeletePhotosRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IBatchDeletePhotosResponse, protos.google.streetview.publish.v1.IBatchDeletePhotosRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing BatchDeletePhotosResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. IDs of the Photos google.streetview.publish.v1.Photo. HTTP
   *  GET requests require the following syntax for the URL query parameter:
   *  `photoIds=

batchDeletePhotos(request, options, callback)

batchDeletePhotos(request: protos.google.streetview.publish.v1.IBatchDeletePhotosRequest, options: CallOptions, callback: Callback<protos.google.streetview.publish.v1.IBatchDeletePhotosResponse, protos.google.streetview.publish.v1.IBatchDeletePhotosRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchDeletePhotosRequest
options CallOptions
callback Callback<protos.google.streetview.publish.v1.IBatchDeletePhotosResponse, protos.google.streetview.publish.v1.IBatchDeletePhotosRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchDeletePhotos(request, callback)

batchDeletePhotos(request: protos.google.streetview.publish.v1.IBatchDeletePhotosRequest, callback: Callback<protos.google.streetview.publish.v1.IBatchDeletePhotosResponse, protos.google.streetview.publish.v1.IBatchDeletePhotosRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchDeletePhotosRequest
callback Callback<protos.google.streetview.publish.v1.IBatchDeletePhotosResponse, protos.google.streetview.publish.v1.IBatchDeletePhotosRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchGetPhotos(request, options)

batchGetPhotos(request?: protos.google.streetview.publish.v1.IBatchGetPhotosRequest, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IBatchGetPhotosResponse,
        protos.google.streetview.publish.v1.IBatchGetPhotosRequest | undefined,
        {} | undefined
    ]>;

Gets the metadata of the specified batch.

Note that if fails, either critical fields are missing or there is an authentication error. Even if succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchGetPhotosResponse.results. See for specific failures that can occur per photo.

Parameters
Name Description
request IBatchGetPhotosRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IBatchGetPhotosResponse, protos.google.streetview.publish.v1.IBatchGetPhotosRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing BatchGetPhotosResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. IDs of the Photos google.streetview.publish.v1.Photo. For HTTP
   *  GET requests, the URL query parameter should be
   *  `photoIds=

batchGetPhotos(request, options, callback)

batchGetPhotos(request: protos.google.streetview.publish.v1.IBatchGetPhotosRequest, options: CallOptions, callback: Callback<protos.google.streetview.publish.v1.IBatchGetPhotosResponse, protos.google.streetview.publish.v1.IBatchGetPhotosRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchGetPhotosRequest
options CallOptions
callback Callback<protos.google.streetview.publish.v1.IBatchGetPhotosResponse, protos.google.streetview.publish.v1.IBatchGetPhotosRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchGetPhotos(request, callback)

batchGetPhotos(request: protos.google.streetview.publish.v1.IBatchGetPhotosRequest, callback: Callback<protos.google.streetview.publish.v1.IBatchGetPhotosResponse, protos.google.streetview.publish.v1.IBatchGetPhotosRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchGetPhotosRequest
callback Callback<protos.google.streetview.publish.v1.IBatchGetPhotosResponse, protos.google.streetview.publish.v1.IBatchGetPhotosRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchUpdatePhotos(request, options)

batchUpdatePhotos(request?: protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IBatchUpdatePhotosResponse,
        protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest | undefined,
        {} | undefined
    ]>;

Updates the metadata of , such as pose, place association, connections, etc. Changing the pixels of photos is not supported.

Note that if fails, either critical fields are missing or there is an authentication error. Even if succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchUpdatePhotosResponse.results. See for specific failures that can occur per photo.

Only the fields specified in field are used. If updateMask is not present, the update applies to all fields.

The number of UpdatePhotoRequest messages in a BatchUpdatePhotosRequest must not exceed 20.

> Note: To update Pose.altitude, has to be filled as well. Otherwise, the request will fail.

Parameters
Name Description
request IBatchUpdatePhotosRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IBatchUpdatePhotosResponse, protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing BatchUpdatePhotosResponse. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. List of
   *  UpdatePhotoRequests google.streetview.publish.v1.UpdatePhotoRequest.
   */
  // const updatePhotoRequests = [1,2,3,4]

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callBatchUpdatePhotos() {
    // Construct request
    const request = {
      updatePhotoRequests,
    };

    // Run request
    const response = await publishClient.batchUpdatePhotos(request);
    console.log(response);
  }

  callBatchUpdatePhotos();

batchUpdatePhotos(request, options, callback)

batchUpdatePhotos(request: protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest, options: CallOptions, callback: Callback<protos.google.streetview.publish.v1.IBatchUpdatePhotosResponse, protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchUpdatePhotosRequest
options CallOptions
callback Callback<protos.google.streetview.publish.v1.IBatchUpdatePhotosResponse, protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

batchUpdatePhotos(request, callback)

batchUpdatePhotos(request: protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest, callback: Callback<protos.google.streetview.publish.v1.IBatchUpdatePhotosResponse, protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IBatchUpdatePhotosRequest
callback Callback<protos.google.streetview.publish.v1.IBatchUpdatePhotosResponse, protos.google.streetview.publish.v1.IBatchUpdatePhotosRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

checkCreatePhotoSequenceProgress(name)

checkCreatePhotoSequenceProgress(name: string): Promise<LROperation<protos.google.streetview.publish.v1.PhotoSequence, protos.google.protobuf.Empty>>;

Check the status of the long running operation returned by createPhotoSequence().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.streetview.publish.v1.PhotoSequence, protos.google.protobuf.Empty>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. PhotoSequence google.streetview.publish.v1.PhotoSequence  to
   *  create.
   */
  // const photoSequence = {}
  /**
   *  Required. The input form of
   *  PhotoSequence google.streetview.publish.v1.PhotoSequence.
   */
  // const inputType = {}

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callCreatePhotoSequence() {
    // Construct request
    const request = {
      photoSequence,
      inputType,
    };

    // Run request
    const [operation] = await publishClient.createPhotoSequence(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePhotoSequence();

checkGetPhotoSequenceProgress(name)

checkGetPhotoSequenceProgress(name: string): Promise<LROperation<protos.google.streetview.publish.v1.PhotoSequence, protos.google.protobuf.Empty>>;

Check the status of the long running operation returned by getPhotoSequence().

Parameter
Name Description
name string

The operation name that will be passed.

Returns
Type Description
Promise<LROperation<protos.google.streetview.publish.v1.PhotoSequence, protos.google.protobuf.Empty>>

{Promise} - The promise which resolves to an object. The decoded operation object has result and metadata field to get information from. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. ID of the photo sequence.
   */
  // const sequenceId = 'abc123'
  /**
   *  Specifies if a download URL for the photo sequence should be returned in
   *  `download_url` of individual photos in the
   *  PhotoSequence google.streetview.publish.v1.PhotoSequence  response.
   *  > Note: Currently not implemented.
   */
  // const view = {}
  /**
   *  Optional. The filter expression. For example: `published_status=PUBLISHED`.
   *  The filters supported are: `published_status`.  See
   *  https://google.aip.dev/160 for more information.
   */
  // const filter = 'abc123'

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callGetPhotoSequence() {
    // Construct request
    const request = {
      sequenceId,
    };

    // Run request
    const [operation] = await publishClient.getPhotoSequence(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callGetPhotoSequence();

close()

close(): Promise<void>;

Terminate the gRPC channel and close the client.

The client will no longer be usable and all future behavior is undefined.

Returns
Type Description
Promise<void>

{Promise} A promise that resolves when the client is closed.

createPhoto(request, options)

createPhoto(request?: protos.google.streetview.publish.v1.ICreatePhotoRequest, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IPhoto,
        protos.google.streetview.publish.v1.ICreatePhotoRequest | undefined,
        {} | undefined
    ]>;

After the client finishes uploading the photo with the returned UploadRef, publishes the uploaded to Street View on Google Maps.

Currently, the only way to set heading, pitch, and roll in CreatePhoto is through the [Photo Sphere XMP metadata](https://developers.google.com/streetview/spherical-metadata) in the photo bytes. CreatePhoto ignores the pose.heading, pose.pitch, pose.roll, pose.altitude, and pose.level fields in Pose.

This method returns the following error codes:

* if the request is malformed or if the uploaded photo is not a 360 photo. * if the upload reference does not exist. * if the account has reached the storage limit.

Parameters
Name Description
request ICreatePhotoRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.ICreatePhotoRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Photo to create.
   */
  // const photo = {}

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callCreatePhoto() {
    // Construct request
    const request = {
      photo,
    };

    // Run request
    const response = await publishClient.createPhoto(request);
    console.log(response);
  }

  callCreatePhoto();

createPhoto(request, options, callback)

createPhoto(request: protos.google.streetview.publish.v1.ICreatePhotoRequest, options: CallOptions, callback: Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.ICreatePhotoRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePhotoRequest
options CallOptions
callback Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.ICreatePhotoRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPhoto(request, callback)

createPhoto(request: protos.google.streetview.publish.v1.ICreatePhotoRequest, callback: Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.ICreatePhotoRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePhotoRequest
callback Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.ICreatePhotoRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPhotoSequence(request, options)

createPhotoSequence(request?: protos.google.streetview.publish.v1.ICreatePhotoSequenceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

After the client finishes uploading the with the returned UploadRef, extracts a sequence of 360 photos from a video or Extensible Device Metadata (XDM, http://www.xdm.org/) to be published to Street View on Google Maps.

CreatePhotoSequence returns an Operation, with the Id set in the Operation.name field.

This method returns the following error codes:

* if the request is malformed. * if the upload reference does not exist.

Parameters
Name Description
request ICreatePhotoSequenceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. PhotoSequence google.streetview.publish.v1.PhotoSequence  to
   *  create.
   */
  // const photoSequence = {}
  /**
   *  Required. The input form of
   *  PhotoSequence google.streetview.publish.v1.PhotoSequence.
   */
  // const inputType = {}

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callCreatePhotoSequence() {
    // Construct request
    const request = {
      photoSequence,
      inputType,
    };

    // Run request
    const [operation] = await publishClient.createPhotoSequence(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callCreatePhotoSequence();

createPhotoSequence(request, options, callback)

createPhotoSequence(request: protos.google.streetview.publish.v1.ICreatePhotoSequenceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePhotoSequenceRequest
options CallOptions
callback Callback<LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

createPhotoSequence(request, callback)

createPhotoSequence(request: protos.google.streetview.publish.v1.ICreatePhotoSequenceRequest, callback: Callback<LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request ICreatePhotoSequenceRequest
callback Callback<LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePhoto(request, options)

deletePhoto(request?: protos.google.streetview.publish.v1.IDeletePhotoRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        protos.google.streetview.publish.v1.IDeletePhotoRequest | undefined,
        {} | undefined
    ]>;

Deletes a and its metadata.

This method returns the following error codes:

* if the requesting user did not create the requested photo. * if the photo ID does not exist.

Parameters
Name Description
request IDeletePhotoRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. ID of the Photo google.streetview.publish.v1.Photo.
   */
  // const photoId = 'abc123'

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callDeletePhoto() {
    // Construct request
    const request = {
      photoId,
    };

    // Run request
    const response = await publishClient.deletePhoto(request);
    console.log(response);
  }

  callDeletePhoto();

deletePhoto(request, options, callback)

deletePhoto(request: protos.google.streetview.publish.v1.IDeletePhotoRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePhotoRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePhoto(request, callback)

deletePhoto(request: protos.google.streetview.publish.v1.IDeletePhotoRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePhotoRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePhotoSequence(request, options)

deletePhotoSequence(request?: protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest, options?: CallOptions): Promise<[
        protos.google.protobuf.IEmpty,
        (protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest | undefined),
        {} | undefined
    ]>;

Deletes a and its metadata.

This method returns the following error codes:

* if the requesting user did not create the requested photo sequence. * if the photo sequence ID does not exist. * if the photo sequence ID is not yet finished processing.

Parameters
Name Description
request IDeletePhotoSequenceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.protobuf.IEmpty, (protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest | undefined), {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing Empty. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. ID of the
   *  PhotoSequence google.streetview.publish.v1.PhotoSequence.
   */
  // const sequenceId = 'abc123'

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callDeletePhotoSequence() {
    // Construct request
    const request = {
      sequenceId,
    };

    // Run request
    const response = await publishClient.deletePhotoSequence(request);
    console.log(response);
  }

  callDeletePhotoSequence();

deletePhotoSequence(request, options, callback)

deletePhotoSequence(request: protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest, options: CallOptions, callback: Callback<protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePhotoSequenceRequest
options CallOptions
callback Callback<protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

deletePhotoSequence(request, callback)

deletePhotoSequence(request: protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest, callback: Callback<protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IDeletePhotoSequenceRequest
callback Callback<protos.google.protobuf.IEmpty, protos.google.streetview.publish.v1.IDeletePhotoSequenceRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPhoto(request, options)

getPhoto(request?: protos.google.streetview.publish.v1.IGetPhotoRequest, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IPhoto,
        protos.google.streetview.publish.v1.IGetPhotoRequest | undefined,
        {} | undefined
    ]>;

Gets the metadata of the specified .

This method returns the following error codes:

* if the requesting user did not create the requested . * if the requested does not exist. * if the requested is still being indexed.

Parameters
Name Description
request IGetPhotoRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IGetPhotoRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. ID of the Photo google.streetview.publish.v1.Photo.
   */
  // const photoId = 'abc123'
  /**
   *  Required. Specifies if a download URL for the photo bytes should be
   *  returned in the Photo google.streetview.publish.v1.Photo  response.
   */
  // const view = {}
  /**
   *  The BCP-47 language code, such as "en-US" or "sr-Latn". For more
   *  information, see
   *  http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
   *  If language_code is unspecified, the user's language preference for Google
   *  services is used.
   */
  // const languageCode = 'abc123'

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callGetPhoto() {
    // Construct request
    const request = {
      photoId,
      view,
    };

    // Run request
    const response = await publishClient.getPhoto(request);
    console.log(response);
  }

  callGetPhoto();

getPhoto(request, options, callback)

getPhoto(request: protos.google.streetview.publish.v1.IGetPhotoRequest, options: CallOptions, callback: Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IGetPhotoRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPhotoRequest
options CallOptions
callback Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IGetPhotoRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPhoto(request, callback)

getPhoto(request: protos.google.streetview.publish.v1.IGetPhotoRequest, callback: Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IGetPhotoRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPhotoRequest
callback Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IGetPhotoRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPhotoSequence(request, options)

getPhotoSequence(request?: protos.google.streetview.publish.v1.IGetPhotoSequenceRequest, options?: CallOptions): Promise<[
        LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>,
        protos.google.longrunning.IOperation | undefined,
        {} | undefined
    ]>;

Gets the metadata of the specified via the Operation interface.

This method returns the following three types of responses:

* Operation.done = false, if the processing of is not finished yet. * Operation.done = true and Operation.error is populated, if there was an error in processing. * Operation.done = true and Operation.response is poulated, which contains a message.

This method returns the following error codes:

* if the requesting user did not create the requested . * if the requested does not exist.

Parameters
Name Description
request IGetPhotoSequenceRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing a long running operation. Its promise() method returns a promise you can await for. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. ID of the photo sequence.
   */
  // const sequenceId = 'abc123'
  /**
   *  Specifies if a download URL for the photo sequence should be returned in
   *  `download_url` of individual photos in the
   *  PhotoSequence google.streetview.publish.v1.PhotoSequence  response.
   *  > Note: Currently not implemented.
   */
  // const view = {}
  /**
   *  Optional. The filter expression. For example: `published_status=PUBLISHED`.
   *  The filters supported are: `published_status`.  See
   *  https://google.aip.dev/160 for more information.
   */
  // const filter = 'abc123'

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callGetPhotoSequence() {
    // Construct request
    const request = {
      sequenceId,
    };

    // Run request
    const [operation] = await publishClient.getPhotoSequence(request);
    const [response] = await operation.promise();
    console.log(response);
  }

  callGetPhotoSequence();

getPhotoSequence(request, options, callback)

getPhotoSequence(request: protos.google.streetview.publish.v1.IGetPhotoSequenceRequest, options: CallOptions, callback: Callback<LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPhotoSequenceRequest
options CallOptions
callback Callback<LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

getPhotoSequence(request, callback)

getPhotoSequence(request: protos.google.streetview.publish.v1.IGetPhotoSequenceRequest, callback: Callback<LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IGetPhotoSequenceRequest
callback Callback<LROperation<protos.google.streetview.publish.v1.IPhotoSequence, protos.google.protobuf.IEmpty>, protos.google.longrunning.IOperation | null | undefined, {} | null | undefined>
Returns
Type Description
void

getProjectId()

getProjectId(): Promise<string>;
Returns
Type Description
Promise<string>

getProjectId(callback)

getProjectId(callback: Callback<string, undefined, undefined>): void;
Parameter
Name Description
callback Callback<string, undefined, undefined>
Returns
Type Description
void

initialize()

initialize(): Promise<{
        [name: string]: Function;
    }>;

Initialize the client. Performs asynchronous operations (such as authentication) and prepares the client. This function will be called automatically when any class method is called for the first time, but if you need to initialize it before calling an actual method, feel free to call initialize() directly.

You can await on this method if you want to make sure the client is initialized.

Returns
Type Description
Promise<{ [name: string]: Function; }>

{Promise} A promise that resolves to an authenticated service stub.

listPhotos(request, options)

listPhotos(request?: protos.google.streetview.publish.v1.IListPhotosRequest, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IPhoto[],
        protos.google.streetview.publish.v1.IListPhotosRequest | null,
        protos.google.streetview.publish.v1.IListPhotosResponse
    ]>;

Lists all the that belong to the user.

> Note: Recently created photos that are still being indexed are not returned in the response.

Parameters
Name Description
request IListPhotosRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IPhoto[], protos.google.streetview.publish.v1.IListPhotosRequest | null, protos.google.streetview.publish.v1.IListPhotosResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of . The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPhotosAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPhotos(request, options, callback)

listPhotos(request: protos.google.streetview.publish.v1.IListPhotosRequest, options: CallOptions, callback: PaginationCallback<protos.google.streetview.publish.v1.IListPhotosRequest, protos.google.streetview.publish.v1.IListPhotosResponse | null | undefined, protos.google.streetview.publish.v1.IPhoto>): void;
Parameters
Name Description
request IListPhotosRequest
options CallOptions
callback PaginationCallback<protos.google.streetview.publish.v1.IListPhotosRequest, protos.google.streetview.publish.v1.IListPhotosResponse | null | undefined, protos.google.streetview.publish.v1.IPhoto>
Returns
Type Description
void

listPhotos(request, callback)

listPhotos(request: protos.google.streetview.publish.v1.IListPhotosRequest, callback: PaginationCallback<protos.google.streetview.publish.v1.IListPhotosRequest, protos.google.streetview.publish.v1.IListPhotosResponse | null | undefined, protos.google.streetview.publish.v1.IPhoto>): void;
Parameters
Name Description
request IListPhotosRequest
callback PaginationCallback<protos.google.streetview.publish.v1.IListPhotosRequest, protos.google.streetview.publish.v1.IListPhotosResponse | null | undefined, protos.google.streetview.publish.v1.IPhoto>
Returns
Type Description
void

listPhotosAsync(request, options)

listPhotosAsync(request?: protos.google.streetview.publish.v1.IListPhotosRequest, options?: CallOptions): AsyncIterable<protos.google.streetview.publish.v1.IPhoto>;

Equivalent to listPhotos, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListPhotosRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.streetview.publish.v1.IPhoto>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing . The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Specifies if a download URL for the photos bytes should be
   *  returned in the Photos response.
   */
  // const view = {}
  /**
   *  Optional. The maximum number of photos to return.
   *  `pageSize` must be non-negative. If `pageSize` is zero or is not provided,
   *  the default page size of 100 is used.
   *  The number of photos returned in the response may be less than `pageSize`
   *  if the number of photos that belong to the user is less than `pageSize`.
   */
  // const pageSize = 1234
  /**
   *  Optional. The
   *  nextPageToken google.streetview.publish.v1.ListPhotosResponse.next_page_token 
   *  value returned from a previous
   *  ListPhotos google.streetview.publish.v1.StreetViewPublishService.ListPhotos 
   *  request, if any.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter expression. For example:
   *  `placeId=ChIJj61dQgK6j4AR4GeTYWZsKWw`.
   *  The filters supported are: `placeId`, `min_latitude`, `max_latitude`,
   *  `min_longitude`, `max_longitude`. See https://google.aip.dev/160 for more
   *  information.
   */
  // const filter = 'abc123'
  /**
   *  Optional. The BCP-47 language code, such as "en-US" or "sr-Latn". For more
   *  information, see
   *  http://www.unicode.org/reports/tr35/#Unicode_locale_identifier.
   *  If language_code is unspecified, the user's language preference for Google
   *  services is used.
   */
  // const languageCode = 'abc123'

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callListPhotos() {
    // Construct request
    const request = {
      view,
    };

    // Run request
    const iterable = publishClient.listPhotosAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPhotos();

listPhotoSequences(request, options)

listPhotoSequences(request?: protos.google.streetview.publish.v1.IListPhotoSequencesRequest, options?: CallOptions): Promise<[
        protos.google.longrunning.IOperation[],
        protos.google.streetview.publish.v1.IListPhotoSequencesRequest | null,
        protos.google.streetview.publish.v1.IListPhotoSequencesResponse
    ]>;

Lists all the that belong to the user, in descending CreatePhotoSequence timestamp order.

Parameters
Name Description
request IListPhotoSequencesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.longrunning.IOperation[], protos.google.streetview.publish.v1.IListPhotoSequencesRequest | null, protos.google.streetview.publish.v1.IListPhotoSequencesResponse ]>

{Promise} - The promise which resolves to an array. The first element of the array is Array of Operation. The client library will perform auto-pagination by default: it will call the API as many times as needed and will merge results from all the pages into this array. Note that it can affect your quota. We recommend using listPhotoSequencesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPhotoSequences(request, options, callback)

listPhotoSequences(request: protos.google.streetview.publish.v1.IListPhotoSequencesRequest, options: CallOptions, callback: PaginationCallback<protos.google.streetview.publish.v1.IListPhotoSequencesRequest, protos.google.streetview.publish.v1.IListPhotoSequencesResponse | null | undefined, protos.google.longrunning.IOperation>): void;
Parameters
Name Description
request IListPhotoSequencesRequest
options CallOptions
callback PaginationCallback<protos.google.streetview.publish.v1.IListPhotoSequencesRequest, protos.google.streetview.publish.v1.IListPhotoSequencesResponse | null | undefined, protos.google.longrunning.IOperation>
Returns
Type Description
void

listPhotoSequences(request, callback)

listPhotoSequences(request: protos.google.streetview.publish.v1.IListPhotoSequencesRequest, callback: PaginationCallback<protos.google.streetview.publish.v1.IListPhotoSequencesRequest, protos.google.streetview.publish.v1.IListPhotoSequencesResponse | null | undefined, protos.google.longrunning.IOperation>): void;
Parameters
Name Description
request IListPhotoSequencesRequest
callback PaginationCallback<protos.google.streetview.publish.v1.IListPhotoSequencesRequest, protos.google.streetview.publish.v1.IListPhotoSequencesResponse | null | undefined, protos.google.longrunning.IOperation>
Returns
Type Description
void

listPhotoSequencesAsync(request, options)

listPhotoSequencesAsync(request?: protos.google.streetview.publish.v1.IListPhotoSequencesRequest, options?: CallOptions): AsyncIterable<protos.google.longrunning.IOperation>;

Equivalent to listPhotoSequences, but returns an iterable object.

for-await-of syntax is used with the iterable to get response elements on-demand.

Parameters
Name Description
request IListPhotoSequencesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
AsyncIterable<protos.google.longrunning.IOperation>

{Object} An iterable Object that allows async iteration. When you iterate the returned iterable, each element will be an object representing Operation. The API will be called under the hood as needed, once per the page, so you can stop the iteration when you don't need more results. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Optional. The maximum number of photo sequences to return.
   *  `pageSize` must be non-negative. If `pageSize` is zero or is not
   *  provided, the default page size of 100 is used.
   *  The number of photo sequences returned in the response may be less than
   *  `pageSize` if the number of matches is less than `pageSize`.
   *  This is currently unimplemented but is in process.
   */
  // const pageSize = 1234
  /**
   *  Optional. The
   *  nextPageToken google.streetview.publish.v1.ListPhotosResponse.next_page_token 
   *  value returned from a previous
   *  ListPhotoSequences google.streetview.publish.v1.StreetViewPublishService.ListPhotoSequences 
   *  request, if any.
   */
  // const pageToken = 'abc123'
  /**
   *  Optional. The filter expression. For example: `imagery_type=SPHERICAL`.
   *  The filters supported are: `imagery_type`, `processing_state`,
   *  `min_latitude`, `max_latitude`, `min_longitude`, `max_longitude`,
   *  `filename_query`, `min_capture_time_seconds`, `max_capture_time_seconds.
   *  See https://google.aip.dev/160 for more information. Filename queries
   *  should sent as a Phrase in order to support multiple words and special
   *  characters by adding escaped quotes. Ex: filename_query="example of a
   *  phrase.mp4"
   */
  // const filter = 'abc123'

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callListPhotoSequences() {
    // Construct request
    const request = {
    };

    // Run request
    const iterable = publishClient.listPhotoSequencesAsync(request);
    for await (const response of iterable) {
        console.log(response);
    }
  }

  callListPhotoSequences();

listPhotoSequencesStream(request, options)

listPhotoSequencesStream(request?: protos.google.streetview.publish.v1.IListPhotoSequencesRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request IListPhotoSequencesRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing Operation on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPhotoSequencesAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

listPhotosStream(request, options)

listPhotosStream(request?: protos.google.streetview.publish.v1.IListPhotosRequest, options?: CallOptions): Transform;

Equivalent to method.name.toCamelCase(), but returns a NodeJS Stream object.

Parameters
Name Description
request IListPhotosRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Transform

{Stream} An object stream which emits an object representing on 'data' event. The client library will perform auto-pagination by default: it will call the API as many times as needed. Note that it can affect your quota. We recommend using listPhotosAsync() method described below for async iteration which you can stop as needed. Please see the documentation for more details and examples.

startPhotoSequenceUpload(request, options)

startPhotoSequenceUpload(request?: protos.google.protobuf.IEmpty, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IUploadRef,
        protos.google.protobuf.IEmpty | undefined,
        {} | undefined
    ]>;

Creates an upload session to start uploading photo sequence data. The upload URL of the returned UploadRef is used to upload the data for the photoSequence.

After the upload is complete, the UploadRef is used with to create the object entry.

Parameters
Name Description
request IEmpty

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing UploadRef. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callStartPhotoSequenceUpload() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await publishClient.startPhotoSequenceUpload(request);
    console.log(response);
  }

  callStartPhotoSequenceUpload();

startPhotoSequenceUpload(request, options, callback)

startPhotoSequenceUpload(request: protos.google.protobuf.IEmpty, options: CallOptions, callback: Callback<protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IEmpty
options CallOptions
callback Callback<protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | null | undefined, {} | null | undefined>
Returns
Type Description
void

startPhotoSequenceUpload(request, callback)

startPhotoSequenceUpload(request: protos.google.protobuf.IEmpty, callback: Callback<protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IEmpty
callback Callback<protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | null | undefined, {} | null | undefined>
Returns
Type Description
void

startUpload(request, options)

startUpload(request?: protos.google.protobuf.IEmpty, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IUploadRef,
        protos.google.protobuf.IEmpty | undefined,
        {} | undefined
    ]>;

Creates an upload session to start uploading photo bytes. The method uses the upload URL of the returned UploadRef to upload the bytes for the .

In addition to the photo requirements shown in https://support.google.com/maps/answer/7012050?ref_topic=6275604, the photo must meet the following requirements:

* Photo Sphere XMP metadata must be included in the photo metadata. See https://developers.google.com/streetview/spherical-metadata for the required fields. * The pixel size of the photo must meet the size requirements listed in https://support.google.com/maps/answer/7012050?ref_topic=6275604, and the photo must be a full 360 horizontally.

After the upload completes, the method uses UploadRef with to create the object entry.

Parameters
Name Description
request IEmpty

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing UploadRef. Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publishw-publishw-publishw-publishw-publishw-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callStartUpload() {
    // Construct request
    const request = {
    };

    // Run request
    const response = await publishClient.startUpload(request);
    console.log(response);
  }

  callStartUpload();

startUpload(request, options, callback)

startUpload(request: protos.google.protobuf.IEmpty, options: CallOptions, callback: Callback<protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IEmpty
options CallOptions
callback Callback<protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | null | undefined, {} | null | undefined>
Returns
Type Description
void

startUpload(request, callback)

startUpload(request: protos.google.protobuf.IEmpty, callback: Callback<protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IEmpty
callback Callback<protos.google.streetview.publish.v1.IUploadRef, protos.google.protobuf.IEmpty | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePhoto(request, options)

updatePhoto(request?: protos.google.streetview.publish.v1.IUpdatePhotoRequest, options?: CallOptions): Promise<[
        protos.google.streetview.publish.v1.IPhoto,
        protos.google.streetview.publish.v1.IUpdatePhotoRequest | undefined,
        {} | undefined
    ]>;

Updates the metadata of a , such as pose, place association, connections, etc. Changing the pixels of a photo is not supported.

Only the fields specified in the field are used. If updateMask is not present, the update applies to all fields.

This method returns the following error codes:

* if the requesting user did not create the requested photo. * if the request is malformed. * if the requested photo does not exist. * if the requested is still being indexed.

Parameters
Name Description
request IUpdatePhotoRequest

The request object that will be sent.

options CallOptions

Call options. See CallOptions for more details.

Returns
Type Description
Promise<[ protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IUpdatePhotoRequest | undefined, {} | undefined ]>

{Promise} - The promise which resolves to an array. The first element of the array is an object representing . Please see the documentation for more details and examples.

Example

  /**
   * This snippet has been automatically generated and should be regarded as a code template only.
   * It will require modifications to work.
   * It may require correct/in-range values for request initialization.
   * TODO(developer): Uncomment these variables before running the sample.
   */
  /**
   *  Required. Photo google.streetview.publish.v1.Photo  object containing the
   *  new metadata.
   */
  // const photo = {}
  /**
   *  Required. Mask that identifies fields on the photo metadata to update.
   *  If not present, the old Photo google.streetview.publish.v1.Photo 
   *  metadata is entirely replaced with the
   *  new Photo google.streetview.publish.v1.Photo  metadata in this request.
   *  The update fails if invalid fields are specified. Multiple fields can be
   *  specified in a comma-delimited list.
   *  The following fields are valid:
   *  * `pose.heading`
   *  * `pose.lat_lng_pair`
   *  * `pose.pitch`
   *  * `pose.roll`
   *  * `pose.level`
   *  * `pose.altitude`
   *  * `connections`
   *  * `places`
   *  > Note: When
   *  updateMask google.streetview.publish.v1.UpdatePhotoRequest.update_mask 
   *  contains repeated fields, the entire set of repeated values get replaced
   *  with the new contents. For example, if
   *  updateMask google.streetview.publish.v1.UpdatePhotoRequest.update_mask 
   *  contains `connections` and `UpdatePhotoRequest.photo.connections` is empty,
   *  all connections are removed.
   */
  // const updateMask = {}

  // Imports the Publish library
  const {StreetViewPublishServiceClient} = require('@googlemaps/streetview-publishw-publishw-publishw-publish').v1;

  // Instantiates a client
  const publishClient = new StreetViewPublishServiceClient();

  async function callUpdatePhoto() {
    // Construct request
    const request = {
      photo,
      updateMask,
    };

    // Run request
    const response = await publishClient.updatePhoto(request);
    console.log(response);
  }

  callUpdatePhoto();

updatePhoto(request, options, callback)

updatePhoto(request: protos.google.streetview.publish.v1.IUpdatePhotoRequest, options: CallOptions, callback: Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IUpdatePhotoRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePhotoRequest
options CallOptions
callback Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IUpdatePhotoRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void

updatePhoto(request, callback)

updatePhoto(request: protos.google.streetview.publish.v1.IUpdatePhotoRequest, callback: Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IUpdatePhotoRequest | null | undefined, {} | null | undefined>): void;
Parameters
Name Description
request IUpdatePhotoRequest
callback Callback<protos.google.streetview.publish.v1.IPhoto, protos.google.streetview.publish.v1.IUpdatePhotoRequest | null | undefined, {} | null | undefined>
Returns
Type Description
void