addBook method
Add a user-upload volume and triggers processing.
Request parameters:
driveDocumentId
- A drive document id. The upload_client_token must not
be set.
mimeType
- The document MIME type. It can be set only if the
drive_document_id is set.
name
- The document name. It can be set only if the drive_document_id is
set.
uploadClientToken
- Scotty upload token.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a BooksCloudloadingResource.
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<BooksCloudloadingResource> addBook({
core.String? driveDocumentId,
core.String? mimeType,
core.String? name,
core.String? uploadClientToken,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
if (driveDocumentId != null) 'drive_document_id': [driveDocumentId],
if (mimeType != null) 'mime_type': [mimeType],
if (name != null) 'name': [name],
if (uploadClientToken != null) 'upload_client_token': [uploadClientToken],
if ($fields != null) 'fields': [$fields],
};
const url_ = 'books/v1/cloudloading/addBook';
final response_ = await _requester.request(
url_,
'POST',
queryParams: queryParams_,
);
return BooksCloudloadingResource.fromJson(
response_ as core.Map<core.String, core.dynamic>);
}