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

OpenLibrary()

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 provide olid 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 and coverSite 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 and coverSize 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 Use title to give search words for the title and/or author for the author name and/or isbn in a 10 or 13 ISBN digits format, if less it is filled with * to 10 digits and/or subject to search for books subject content and/or place to find places named in the books and/or person to find fictive or real persons in the book and/or language if you want to find special published languages and/or publisher to find books publishers as a filter or use q only to find any given content use loadCover indicates if the cover should be loaded, default = true and coverSite 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 by limit 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