Book constructor

Book({
  1. required String title,
  2. @JsonKey.new(name: 'title_long') String? titleLong,
  3. required String isbn,
  4. required String isbn13,
  5. @JsonKey.new(name: 'dewey_decimal') String? deweyDecimal,
  6. String? binding,
  7. String? publisher,
  8. String? language,
  9. @JsonKey.new(name: 'date_published') DateTime? datePublished,
  10. @Deprecated('Use editionNumber instead.') String? edition,
  11. @JsonKey.new(name: 'edition_number') int? editionNumber,
  12. int? pages,
  13. String? dimensions,
  14. String? overview,
  15. String? image,
  16. @Deprecated('Use listPrice instead.') double? msrp,
  17. @JsonKey.new(name: 'list_price') ListPrice? listPrice,
  18. @Deprecated('Deprecated by ISBNdb without a replacement.') String? excerpt,
  19. String? synopsys,
  20. @JsonKey.new(readValue: _readBookAuthors) List<String?>? authors,
  21. @Deprecated('Deprecated by ISBNdb without a replacement.') @JsonKey.new(readValue: _readBookSubjects) List<String>? subjects,
  22. @JsonKey.new(readValue: _readBookReviews) List<String>? reviews,
  23. List<Merchant>? prices,
  24. @JsonKey.new(readValue: _readBookRelated) List<String>? related,
})

Implementation

factory Book({
  /// Title of the book
  required String title,

  /// Long version of the title
  @JsonKey(name: 'title_long') String? titleLong,

  /// ISBN of the book
  required String isbn,

  /// New 13-digit ISBN
  required String isbn13,

  /// Not documented in the official API
  @_DeweyDecimalConverter()
  @JsonKey(name: 'dewey_decimal')
  String? deweyDecimal,

  /// Not documented in the official API
  String? binding,

  /// The name of the publisher
  String? publisher,

  /// Language of the book
  /// ISO 639-3 language code or regional tag (pt-br, fr-ca, zh-tw, es-419).
  String? language,

  /// Date when the book was published.
  ///
  /// Partial API values are normalized to the start of their period: a year
  /// becomes January 1st and a year-month becomes the first day of the month.
  @_DateConverter() @JsonKey(name: 'date_published') DateTime? datePublished,

  /// Edition of the book as a string.
  @Deprecated('Use editionNumber instead.') String? edition,

  /// Numeric edition of the book.
  @JsonKey(name: 'edition_number') int? editionNumber,

  /// Number of pages of the book
  int? pages,

  /// Dimensions of the book
  String? dimensions,

  /// Not documented in the official API
  String? overview,

  /// URL of the cover, up to 450 pixels high. May be a placeholder.
  String? image,

  /// Manufacturer's suggested retail price in USD.
  @Deprecated('Use listPrice instead.') @_MsrpConverter() double? msrp,

  /// List price of the book with its currency.
  @JsonKey(name: 'list_price') ListPrice? listPrice,

  /// Excerpt of the book. Deprecated by ISBNdb without a replacement.
  @Deprecated('Deprecated by ISBNdb without a replacement.') String? excerpt,

  /// Synopsys of the book
  String? synopsys,

  /// List of the authors of the book
  @JsonKey(readValue: _readBookAuthors) List<String?>? authors,

  /// List of the subjects of the book. Scheduled for removal by ISBNdb.
  @Deprecated('Deprecated by ISBNdb without a replacement.')
  @JsonKey(readValue: _readBookSubjects)
  List<String>? subjects,

  /// Not documented in the official API
  @JsonKey(readValue: _readBookReviews) List<String>? reviews,

  /// List of the merchants selling this book with real-time prices
  List<Merchant>? prices,

  /// Not documented in the official API
  @JsonKey(readValue: _readBookRelated) List<String>? related,
}) = _Book;