OpenLibrary class
OpenLibrary class to support an easy way to consume openlibrary.org api Version 0.1.4 Author: Andreas Lange Published in 2022 Licensed under the MIT License
Constructors
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
Methods
-
dispose(
) → void - call dispose to close the API Client proper-
-
getAuthorByOLID(
{required String olid}) → Future< OLAuthorBase> -
To fetch auther by his's OL UD number from OpenLibrary.org
use getAuthorByOLID. Always check RuntimeType
OLAuthorsBase
type is -> OLAuthor / OLAuthorError provideolid
as the openlibrary id for Authors -
getBookByISBN(
{required String isbn, bool loadCover = true, CoverSize coverSize = CoverSize.L}) → Future< OLBookBase> -
This function getBookByISBN fetches a book by it's ISBN number
(10 or 13 digits) from OpenLibrary.org.
Always check RuntimeType OLBookBase type is -> OLBook / OLBookError
use
loadCover
to indicate if the cover should be loaded, default = true andcoverSite
to define the loaded size, M,S,L from enum CoverSize, default = L -
getCover(
{required int coverId, required CoverSize coverSize}) → Future< Uint8List> -
This function getCover is called implicit but can also be called
from outside to load a cover as Uint8List. If there is no cover it
returns an empty Uint8List. Use
coverId
to specify it's OL ID andcoverSize
S/M/L CoverSize to load -
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
query(
{String query = "", String title = "", String author = "", String subject = "", String place = "", String person = "", SearchLanguage language = SearchLanguage.none, String publisher = "", String isbn = "", String q = "", bool loadCover = true, CoverSize coverSize = CoverSize.S, int limit = 10}) → Future< OLSearchBase> -
To
query
the openlibrary.org/search.json api with all it's options Always check RuntimeType OLSearchBase type is -> OLSearch / OLSearchError Usetitle
to give search words for the title and/orauthor
for the author name and/orisbn
in a 10 or 13 ISBN digits format, if less it is filled with * to 10 digits and/orsubject
to search for books subject content and/orplace
to find places named in the books and/orperson
to find fictive or real persons in the book and/orlanguage
if you want to find special published languages and/orpublisher
to find books publishers as a filter or useq
only to find any given content useloadCover
indicates if the cover should be loaded, default = true andcoverSite
to define the loaded size, M,S,L from enum CoverSize, default = S, if you want to limit the search, it returns max docs set bylimit
and just load limit covers, default = 10 -
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited