quotable library
Quotable https://github.com/lukePeavey/quotable
is a free, open source quotations API.
It was originally built as part of a FreeCodeCamp project.
The database includes over 2000 quotes by 900 authors.
This library is a wrapper to the API Service for the Dart Lang for easier access to the API.
Functions
-
getAuthorByID(
String id) → Future< Authors> - Get details about a specific author by _id.
-
getAuthors(
{String? slug, SortByAuthor? sortBy, SortOrder? order, int? limit, int? page}) → Future< ListAuthors> - Get all authors matching the given query. This endpoint can be used to list authors, with several options for sorting and filter. It can also be used to get author details for one or more specific authors, using the author slug or ids.
-
getQuoteByID(
String id) → Future< Quote> - Get a quote by its ID
-
getQuotes(
{int? maxLength, int? minLength, String? tags, SortByQuote? sortBy, SortOrder? order, int? limit, int? page}) → Future< ListQuote> - Get all quotes matching a given query. By default, this will return a paginated list of all quotes, sorted by _id. Quotes can also be filter by author, tag, and length.
-
getRandomQuote(
{int? maxLength, int? minLength, String? tags, String? author}) → Future< Quote> -
Get a single random quote from the database.
Endpoint:
/random
-
getTags(
{SortByTags? sortBy, SortOrder? order}) → Future< ListTags> - Get a list of all tags