Class: Google::Apis::StreetviewpublishV1::StreetViewPublishService

Inherits:
Core::BaseService
  • Object
show all
Defined in:
lib/google/apis/streetviewpublish_v1/service.rb

Overview

Street View Publish API

Publishes 360 photos to Google Maps, along with position, orientation, and connectivity metadata. Apps can offer an interface for positioning, connecting, and uploading user-generated Street View images.

Examples:

require 'google/apis/streetviewpublish_v1'

Streetviewpublish = Google::Apis::StreetviewpublishV1 # Alias the module
service = Streetviewpublish::StreetViewPublishService.new

See Also:

Constant Summary collapse

DEFAULT_ENDPOINT_TEMPLATE =
"https://streetviewpublish.$UNIVERSE_DOMAIN$/"

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initializeStreetViewPublishService

Returns a new instance of StreetViewPublishService.



49
50
51
52
53
54
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 49

def initialize
  super(DEFAULT_ENDPOINT_TEMPLATE, '',
        client_name: 'google-apis-streetviewpublish_v1',
        client_version: Google::Apis::StreetviewpublishV1::GEM_VERSION)
  @batch_path = 'batch'
end

Instance Attribute Details

#keyString

Returns API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.

Returns:

  • (String)

    API key. Your API key identifies your project and provides you with API access, quota, and reports. Required unless you provide an OAuth 2.0 token.



42
43
44
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 42

def key
  @key
end

#quota_userString

Returns Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

Returns:

  • (String)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.



47
48
49
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 47

def quota_user
  @quota_user
end

Instance Method Details

#batch_delete_photos(batch_delete_photos_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::BatchDeletePhotosResponse

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

Parameters:

  • batch_delete_photos_request_object (Google::Apis::StreetviewpublishV1::BatchDeletePhotosRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



493
494
495
496
497
498
499
500
501
502
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 493

def batch_delete_photos(batch_delete_photos_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/photos:batchDelete', options)
  command.request_representation = Google::Apis::StreetviewpublishV1::BatchDeletePhotosRequest::Representation
  command.request_object = batch_delete_photos_request_object
  command.response_representation = Google::Apis::StreetviewpublishV1::BatchDeletePhotosResponse::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::BatchDeletePhotosResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_photo_get(language_code: nil, photo_ids: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::BatchGetPhotosResponse

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

Parameters:

  • language_code (String) (defaults to: nil)

    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.

  • photo_ids (Array<String>, String) (defaults to: nil)

    Required. IDs of the Photos. For HTTP GET requests, the URL query parameter should be photoIds=&photoIds=&....

  • view (String) (defaults to: nil)

    Required. Specifies if a download URL for the photo bytes should be returned in the Photo response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



538
539
540
541
542
543
544
545
546
547
548
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 538

def batch_photo_get(language_code: nil, photo_ids: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/photos:batchGet', options)
  command.response_representation = Google::Apis::StreetviewpublishV1::BatchGetPhotosResponse::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::BatchGetPhotosResponse
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['photoIds'] = photo_ids unless photo_ids.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#batch_update_photos(batch_update_photos_request_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::BatchUpdatePhotosResponse

Updates the metadata of Photos, such as pose, place association, connections, etc. Changing the pixels of photos is not supported. Note that if BatchUpdatePhotos fails, either critical fields are missing or there is an authentication error. Even if BatchUpdatePhotos succeeds, individual photos in the batch may have failures. These failures are specified in each PhotoResponse.status in BatchUpdatePhotosResponse.results. See UpdatePhoto for specific failures that can occur per photo. Only the fields specified in updateMask 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, Pose.latLngPair has to be filled as well. Otherwise, the request will fail.

Parameters:

  • batch_update_photos_request_object (Google::Apis::StreetviewpublishV1::BatchUpdatePhotosRequest) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



579
580
581
582
583
584
585
586
587
588
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 579

def batch_update_photos(batch_update_photos_request_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/photos:batchUpdate', options)
  command.request_representation = Google::Apis::StreetviewpublishV1::BatchUpdatePhotosRequest::Representation
  command.request_object = batch_update_photos_request_object
  command.response_representation = Google::Apis::StreetviewpublishV1::BatchUpdatePhotosResponse::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::BatchUpdatePhotosResponse
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_photo(photo_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::Photo

After the client finishes uploading the photo with the returned UploadRef, CreatePhoto publishes the uploaded Photo 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 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: * google.rpc. Code.INVALID_ARGUMENT if the request is malformed or if the uploaded photo is not a 360 photo. * google.rpc.Code.NOT_FOUND if the upload reference does not exist. * google.rpc.Code.RESOURCE_EXHAUSTED if the account has reached the storage limit.

Parameters:

  • photo_object (Google::Apis::StreetviewpublishV1::Photo) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



85
86
87
88
89
90
91
92
93
94
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 85

def create_photo(photo_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/photo', options)
  command.request_representation = Google::Apis::StreetviewpublishV1::Photo::Representation
  command.request_object = photo_object
  command.response_representation = Google::Apis::StreetviewpublishV1::Photo::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::Photo
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#create_photo_sequence(photo_sequence_object = nil, input_type: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::Operation

After the client finishes uploading the PhotoSequence with the returned UploadRef, CreatePhotoSequence 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 PhotoSequence Id set in the Operation.name field. This method returns the following error codes: * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the upload reference does not exist.

Parameters:

  • photo_sequence_object (Google::Apis::StreetviewpublishV1::PhotoSequence) (defaults to: nil)
  • input_type (String) (defaults to: nil)

    Required. The input form of PhotoSequence.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



294
295
296
297
298
299
300
301
302
303
304
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 294

def create_photo_sequence(photo_sequence_object = nil, input_type: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/photoSequence', options)
  command.request_representation = Google::Apis::StreetviewpublishV1::PhotoSequence::Representation
  command.request_object = photo_sequence_object
  command.response_representation = Google::Apis::StreetviewpublishV1::Operation::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::Operation
  command.query['inputType'] = input_type unless input_type.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_photo(photo_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::Empty

Deletes a Photo and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. * google.rpc.Code.NOT_FOUND if the photo ID does not exist.

Parameters:

  • photo_id (String)

    Required. ID of the Photo.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



119
120
121
122
123
124
125
126
127
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 119

def delete_photo(photo_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/photo/{photoId}', options)
  command.response_representation = Google::Apis::StreetviewpublishV1::Empty::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::Empty
  command.params['photoId'] = photo_id unless photo_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#delete_photo_sequence(sequence_id, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::Empty

Deletes a PhotoSequence and its metadata. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo sequence. * google.rpc.Code.NOT_FOUND if the photo sequence ID does not exist. * google.rpc.Code.FAILED_PRECONDITION if the photo sequence ID is not yet finished processing.

Parameters:

  • sequence_id (String)

    Required. ID of the PhotoSequence.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



330
331
332
333
334
335
336
337
338
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 330

def delete_photo_sequence(sequence_id, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:delete, 'v1/photoSequence/{sequenceId}', options)
  command.response_representation = Google::Apis::StreetviewpublishV1::Empty::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::Empty
  command.params['sequenceId'] = sequence_id unless sequence_id.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_photo(photo_id, language_code: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::Photo

Gets the metadata of the specified Photo. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested Photo. * google.rpc.Code.NOT_FOUND if the requested Photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is still being indexed.

Parameters:

  • photo_id (String)

    Required. ID of the Photo.

  • language_code (String) (defaults to: nil)

    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.

  • view (String) (defaults to: nil)

    Required. Specifies if a download URL for the photo bytes should be returned in the Photo response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



161
162
163
164
165
166
167
168
169
170
171
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 161

def get_photo(photo_id, language_code: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/photo/{photoId}', options)
  command.response_representation = Google::Apis::StreetviewpublishV1::Photo::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::Photo
  command.params['photoId'] = photo_id unless photo_id.nil?
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#get_photo_sequence(sequence_id, filter: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::Operation

Gets the metadata of the specified PhotoSequence via the Operation interface. This method returns the following three types of responses: * Operation.done = false, if the processing of PhotoSequence 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 PhotoSequence message. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested PhotoSequence. * google.rpc.Code.NOT_FOUND if the requested PhotoSequence does not exist.

Parameters:

  • sequence_id (String)

    Required. ID of the photo sequence.

  • filter (String) (defaults to: nil)

    Optional. The filter expression. For example: published_status=PUBLISHED. The filters supported are: published_status. See https://google.aip.dev/160 for more information.

  • view (String) (defaults to: nil)

    Specifies if a download URL for the photo sequence should be returned in download_url of individual photos in the PhotoSequence response. > Note: Currently not implemented.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



376
377
378
379
380
381
382
383
384
385
386
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 376

def get_photo_sequence(sequence_id, filter: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/photoSequence/{sequenceId}', options)
  command.response_representation = Google::Apis::StreetviewpublishV1::Operation::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::Operation
  command.params['sequenceId'] = sequence_id unless sequence_id.nil?
  command.query['filter'] = filter unless filter.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_photo_sequences(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::ListPhotoSequencesResponse

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

Parameters:

  • filter (String) (defaults to: nil)

    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"

  • page_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    Optional. The nextPageToken value returned from a previous ListPhotoSequences request, if any.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



457
458
459
460
461
462
463
464
465
466
467
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 457

def list_photo_sequences(filter: nil, page_size: nil, page_token: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/photoSequences', options)
  command.response_representation = Google::Apis::StreetviewpublishV1::ListPhotoSequencesResponse::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::ListPhotoSequencesResponse
  command.query['filter'] = filter unless filter.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#list_photos(filter: nil, language_code: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::ListPhotosResponse

Lists all the Photos that belong to the user. > Note: Recently created photos that are still being indexed are not returned in the response.

Parameters:

  • filter (String) (defaults to: nil)

    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.

  • language_code (String) (defaults to: nil)

    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.

  • page_size (Fixnum) (defaults to: nil)

    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.

  • page_token (String) (defaults to: nil)

    Optional. The nextPageToken value returned from a previous ListPhotos request, if any.

  • view (String) (defaults to: nil)

    Required. Specifies if a download URL for the photos bytes should be returned in the Photos response.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



631
632
633
634
635
636
637
638
639
640
641
642
643
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 631

def list_photos(filter: nil, language_code: nil, page_size: nil, page_token: nil, view: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:get, 'v1/photos', options)
  command.response_representation = Google::Apis::StreetviewpublishV1::ListPhotosResponse::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::ListPhotosResponse
  command.query['filter'] = filter unless filter.nil?
  command.query['languageCode'] = language_code unless language_code.nil?
  command.query['pageSize'] = page_size unless page_size.nil?
  command.query['pageToken'] = page_token unless page_token.nil?
  command.query['view'] = view unless view.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#start_photo_sequence_upload(empty_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::UploadRef

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 CreatePhotoSequence to create the PhotoSequence object entry.

Parameters:

  • empty_object (Google::Apis::StreetviewpublishV1::Empty) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



410
411
412
413
414
415
416
417
418
419
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 410

def start_photo_sequence_upload(empty_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/photoSequence:startUpload', options)
  command.request_representation = Google::Apis::StreetviewpublishV1::Empty::Representation
  command.request_object = empty_object
  command.response_representation = Google::Apis::StreetviewpublishV1::UploadRef::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::UploadRef
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#start_photo_upload(empty_object = nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::UploadRef

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 Photo. 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 CreatePhoto to create the Photo object entry.

Parameters:

  • empty_object (Google::Apis::StreetviewpublishV1::Empty) (defaults to: nil)
  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



202
203
204
205
206
207
208
209
210
211
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 202

def start_photo_upload(empty_object = nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:post, 'v1/photo:startUpload', options)
  command.request_representation = Google::Apis::StreetviewpublishV1::Empty::Representation
  command.request_object = empty_object
  command.response_representation = Google::Apis::StreetviewpublishV1::UploadRef::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::UploadRef
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end

#update_photo(id, photo_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil) {|result, err| ... } ⇒ Google::Apis::StreetviewpublishV1::Photo

Updates the metadata of a Photo, such as pose, place association, connections, etc. Changing the pixels of a photo is not supported. Only the fields specified in the updateMask field are used. If updateMask is not present, the update applies to all fields. This method returns the following error codes: * google.rpc.Code.PERMISSION_DENIED if the requesting user did not create the requested photo. * google.rpc.Code.INVALID_ARGUMENT if the request is malformed. * google.rpc.Code.NOT_FOUND if the requested photo does not exist. * google.rpc.Code.UNAVAILABLE if the requested Photo is still being indexed.

Parameters:

  • id (String)

    A unique identifier for a photo.

  • photo_object (Google::Apis::StreetviewpublishV1::Photo) (defaults to: nil)
  • update_mask (String) (defaults to: nil)

    Required. Mask that identifies fields on the photo metadata to update. If not present, the old Photo metadata is entirely replaced with the new 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 contains repeated fields, the entire set of repeated values get replaced with the new contents. For example, if updateMask contains connections and UpdatePhotoRequest.photo.connections is empty, all connections are removed.

  • fields (String) (defaults to: nil)

    Selector specifying which fields to include in a partial response.

  • quota_user (String) (defaults to: nil)

    Available to use for quota purposes for server-side applications. Can be any arbitrary string assigned to a user, but should not exceed 40 characters.

  • options (Google::Apis::RequestOptions) (defaults to: nil)

    Request-specific options

Yields:

  • (result, err)

    Result & error if block supplied

Yield Parameters:

Returns:

Raises:

  • (Google::Apis::ServerError)

    An error occurred on the server and the request can be retried

  • (Google::Apis::ClientError)

    The request is invalid and should not be retried without modification

  • (Google::Apis::AuthorizationError)

    Authorization is required



253
254
255
256
257
258
259
260
261
262
263
264
# File 'lib/google/apis/streetviewpublish_v1/service.rb', line 253

def update_photo(id, photo_object = nil, update_mask: nil, fields: nil, quota_user: nil, options: nil, &block)
  command = make_simple_command(:put, 'v1/photo/{id}', options)
  command.request_representation = Google::Apis::StreetviewpublishV1::Photo::Representation
  command.request_object = photo_object
  command.response_representation = Google::Apis::StreetviewpublishV1::Photo::Representation
  command.response_class = Google::Apis::StreetviewpublishV1::Photo
  command.params['id'] = id unless id.nil?
  command.query['updateMask'] = update_mask unless update_mask.nil?
  command.query['fields'] = fields unless fields.nil?
  command.query['quotaUser'] = quota_user unless quota_user.nil?
  execute_or_queue_command(command, &block)
end