getBook method

Future<Book?> getBook(
  1. String isbn, {
  2. bool withPrices = false,
})

Get book details from an ISBN

Implementation

Future<Book?> getBook(
  String isbn, {
  bool withPrices = false,
}) async {
  final response = await _get(
    "book/$isbn",
    queryParameters: <String, Object?>{
      "with_prices": withPrices ? 1 : 0,
    },
  );
  final bookJson = response['book'];
  return bookJson != null ? Book.fromJson(bookJson) : null;
}