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 setter inherited
runtimeType
→ Type
A representation of the runtime type of the object.
no setter inherited
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 , ChapterSorting? sorting , List <Filter? > ? idFilters , List <Filter? > ? chapterNameFilters })
→ Future <Response <Chapter > >
Returns Chapter s of a particular Book based on the given pagination
,
sorting
and filters.
getBooks ({BookSorting? sorting , List <Filter? > ? idFilters , List <Filter? > ? nameFilters })
→ Future <Response <Book > >
Returns Book s 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 ({ChapterSorting? sorting , List <Filter? > ? idFilters , List <Filter? > ? chapterNameFilters })
→ Future <Response <Chapter > >
Returns Chapter s 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 , QuoteSorting? sorting , List <Filter? > ? idFilters , List <Filter? > ? dialogFilters })
→ Future <Response <Quote > >
Returns Quote s of a particular Character based on the given
pagination
, sorting
and filters.
getCharacters ({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 Character s 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 , QuoteSorting? sorting , List <Filter? > ? idFilters , List <Filter? > ? dialogFilters })
→ Future <Response <Quote > >
Returns Quote s of a particular Movie based on the given pagination
,
sorting
and filters.
getMovies ({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 Movie s 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 ({QuoteSorting? sorting , List <Filter? > ? idFilters , List <Filter? > ? dialogFilters })
→ Future <Response <Quote > >
Returns Quote s 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