create method
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.
request
- The metadata request object.
Request parameters:
inputType
- Required. The input form of PhotoSequence.
Possible string values are:
- "INPUT_TYPE_UNSPECIFIED" : Not specified. Server will return google.rpc.Code.INVALID_ARGUMENT.
- "VIDEO" : 360 Video.
- "XDM" : Extensible Device Metadata, http://www.xdm.org
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Operation.
Completes with a commons.ApiRequestError if the API endpoint returned an error.
If the used http.Client
completes with an error when making a REST call,
this method will complete with the same error.
Implementation
async.Future<Operation> create(
PhotoSequence request, {
core.String? inputType,
core.String? $fields,
}) async {
final body_ = convert.json.encode(request);
final queryParams_ = <core.String, core.List<core.String>>{
if (inputType != null) 'inputType': [inputType],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'v1/photoSequence';
final response_ = await _requester.request(
url_,
'POST',
body: body_,
queryParams: queryParams_,
);
return Operation.fromJson(response_ as core.Map<core.String, core.dynamic>);
}