get method

Future<Series> get(
  1. List<String> seriesId, {
  2. String? $fields,
})

Returns Series metadata for the given series ids.

Request parameters:

seriesId - String that identifies the series

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

Completes with a Series.

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<Series> get(
  core.List<core.String> seriesId, {
  core.String? $fields,
}) async {
  if (seriesId.isEmpty) {
    throw core.ArgumentError('Parameter seriesId cannot be empty.');
  }
  final queryParams_ = <core.String, core.List<core.String>>{
    'series_id': seriesId,
    if ($fields != null) 'fields': [$fields],
  };

  const url_ = 'books/v1/series/get';

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