syncVolumeLicenses method

Future<Volumes> syncVolumeLicenses(
  1. String cpksver,
  2. String nonce,
  3. String source, {
  4. List<String>? features,
  5. bool? includeNonComicsSeries,
  6. String? locale,
  7. bool? showPreorders,
  8. List<String>? volumeIds,
  9. String? $fields,
})

Request downloaded content access for specified volumes on the My eBooks shelf.

Request parameters:

cpksver - The device/version ID from which to release the restriction.

nonce - The client nonce value.

source - String to identify the originator of this request.

features - List of features supported by the client, i.e., 'RENTALS'

includeNonComicsSeries - Set to true to include non-comics series. Defaults to false.

locale - ISO-639-1, ISO-3166-1 codes for message localization, i.e. en_US.

showPreorders - Set to true to show pre-ordered books. Defaults to false.

volumeIds - The volume(s) to request download restrictions for.

$fields - Selector specifying which fields to include in a partial response.

Completes with a Volumes.

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<Volumes> syncVolumeLicenses(
  core.String cpksver,
  core.String nonce,
  core.String source, {
  core.List<core.String>? features,
  core.bool? includeNonComicsSeries,
  core.String? locale,
  core.bool? showPreorders,
  core.List<core.String>? volumeIds,
  core.String? $fields,
}) async {
  final queryParams_ = <core.String, core.List<core.String>>{
    'cpksver': [cpksver],
    'nonce': [nonce],
    'source': [source],
    if (features != null) 'features': features,
    if (includeNonComicsSeries != null)
      'includeNonComicsSeries': ['${includeNonComicsSeries}'],
    if (locale != null) 'locale': [locale],
    if (showPreorders != null) 'showPreorders': ['${showPreorders}'],
    if (volumeIds != null) 'volumeIds': volumeIds,
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'books/v1/myconfig/syncVolumeLicenses';

  final response_ = await _requester.request(
    url_,
    'POST',
    queryParams: queryParams_,
  );
  return Volumes.fromJson(response_ as core.Map<core.String, core.dynamic>);
}