removeVolume method
Removes a volume from a bookshelf.
Request parameters:
shelf
- ID of bookshelf from which to remove a volume.
volumeId
- ID of volume to remove.
reason
- The reason for which the book is removed from the library.
Possible string values are:
- "REASON_UNDEFINED"
- "ONBOARDING" : Samples removed from the Onboarding flow.
source
- String to identify the originator of this request.
$fields
- Selector specifying which fields to include in a partial
response.
Completes with a Empty.
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<Empty> removeVolume(
core.String shelf,
core.String volumeId, {
core.String? reason,
core.String? source,
core.String? $fields,
}) async {
final queryParams_ = <core.String, core.List<core.String>>{
'volumeId': [volumeId],
if (reason != null) 'reason': [reason],
if (source != null) 'source': [source],
if ($fields != null) 'fields': [$fields],
};
final url_ = 'books/v1/mylibrary/bookshelves/' +
commons.escapeVariable('$shelf') +
'/removeVolume';
final response_ = await _requester.request(
url_,
'POST',
queryParams: queryParams_,
);
return Empty.fromJson(response_ as core.Map<core.String, core.dynamic>);
}