google_books_api 1.0.1 copy "google_books_api: ^1.0.1" to clipboard
google_books_api: ^1.0.1 copied to clipboard

A library to help on the search for books on google books api

google_books_api #

A dart package to search books with the Google Books Api.

Installing #

Add google_books_api to your pubspec.yaml file:

dependencies:
  google_books_api: ^1.0.0

Import google_books_api in files that it will be used:

import 'package:google_books_api/google_books_api.dart';

Usage/Examples #

Search books #

To get a list of books corresponding to the query.

final List<Book> books = await GoogleBooksApi().searchBooks(
    'book',
    maxResults: 20,
    printType: PrintType.books,
    orderBy: OrderBy.relevance,
);

You can use this parameters to make the query more efficient.

Parameter Description
queryType Keywords to search in particular fields
maxResults The maximum number of elements to return with this request.
startIndex The position in the collection at which to start the list of results.
langRestrict Restrict the search results to those with a certain language by specifying langRestrict to a two-letter ISO-639-1 code, such as "en" or "fr".
orderBy Order of the volume search results.
printType Restrict to books or magazines.

Get book by ID #

To get a book from his ID.

final Book book = await GoogleBooksApi().getBookById('H0taAAAAYAAJ');
3
likes
90
pub points
74%
popularity

Publisher

unverified uploader

A library to help on the search for books on google books api

Repository (GitHub)
View/report issues

Documentation

API reference

License

BSD-3-Clause (LICENSE)

Dependencies

equatable, http, json_annotation

More

Packages that depend on google_books_api