LotrApi class

Constructors

LotrApi({String? apiKey})
Main entry point to the API. This class provides all API methods for this package. The apiKey is the API access key for the-one-api which can be requested via https://the-one-api.dev/sign-up, but needs not be provided if you only want to request books.

Properties

apiKey String?
This API access key is used to authenticate the user when making a request to the-one-api. Needs not be provided for the open '/book' endpoint.
final
hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getBook({required String id}) Future<Book?>
Returns the Book with the given id or null if this id does not exist.
getBookChapters({required String bookId, Pagination? pagination, ChapterSorting? sorting, List<Filter?>? idFilters, List<Filter?>? chapterNameFilters}) Future<Response<Chapter>>
Returns Chapters of a particular Book based on the given pagination, sorting and filters.
getBooks({Pagination? pagination, BookSorting? sorting, List<Filter?>? idFilters, List<Filter?>? nameFilters}) Future<Response<Book>>
Returns Books based on the given pagination, sorting and filters.
getChapter({required String id}) Future<Chapter?>
Returns the Chapter with the given id or null if this id does not exist.
getChapters({Pagination? pagination, ChapterSorting? sorting, List<Filter?>? idFilters, List<Filter?>? chapterNameFilters}) Future<Response<Chapter>>
Returns Chapters based on the given pagination, sorting and filters.
getCharacter({required String id}) Future<Character?>
Returns the Character with the given id or null if this id does not exist.
getCharacterQuotes({required String characterId, Pagination? pagination, QuoteSorting? sorting, List<Filter?>? idFilters, List<Filter?>? dialogFilters}) Future<Response<Quote>>
Returns Quotes of a particular Character based on the given pagination, sorting and filters.
getCharacters({Pagination? pagination, CharacterSorting? sorting, List<Filter?>? idFilters, List<Filter?>? nameFilters, List<Filter?>? birthFilters, List<Filter?>? deathFilters, List<Filter?>? hairFilters, List<Filter?>? genderFilters, List<Filter?>? heightFilters, List<Filter?>? realmFilters, List<Filter?>? spouseFilters, List<Filter?>? raceFilters, List<Filter?>? wikiUrlFilters}) Future<Response<Character>>
Returns Characters based on the given pagination, sorting and filters.
getMovie({required String id}) Future<Movie?>
Returns the Movie with the given id or null if this id does not exist.
getMovieQuotes({required String movieId, Pagination? pagination, QuoteSorting? sorting, List<Filter?>? idFilters, List<Filter?>? dialogFilters}) Future<Response<Quote>>
Returns Quotes of a particular Movie based on the given pagination, sorting and filters.
getMovies({Pagination? pagination, MovieSorting? sorting, List<Filter?>? idFilters, List<Filter?>? nameFilters, List<Filter?>? runtimeInMinutesFilters, List<Filter?>? budgetInMillionsFilters, List<Filter?>? boxOfficeRevenueInMillionsFilters, List<Filter?>? academyAwardNominationsFilters, List<Filter?>? academyAwardWinsFilters, List<Filter?>? rottenTomatoesScoreFilters}) Future<Response<Movie>>
Returns Movies based on the given pagination, sorting and filters.
getQuote({required String id}) Future<Quote?>
Returns the Quote with the given id or null if this id does not exist.
getQuotes({Pagination? pagination, QuoteSorting? sorting, List<Filter?>? idFilters, List<Filter?>? dialogFilters}) Future<Response<Quote>>
Returns Quotes based on the given pagination, sorting and filters.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited