getQuotes method

Future<List<Results>> getQuotes({
  1. int numberOfQuotes = 1,
})

Get quotes

Returns a list of Quotes from the Breaking Bad.

If needed only 1 then no need to set numberOfQuotes. The result will be always in List format even if numberOfQuotes is 1.

For more details on the API go here.

Throws BreakingBadQuotesException on an error.

Implementation

Future<List<Results>> getQuotes({
  int numberOfQuotes = 1,
}) async {
  var params = QuotesParams(
    numberOfQuotes: numberOfQuotes,
  );

  _logger.info('Getting $numberOfQuotes quotes from Breaking Bad');

  return defaultFlow<QuotesParams, List<Results>>(
    core: this,
    params: params,
    serializer: (dynamic json) => resultsFromMap(
      json as List<dynamic>,
    ),
  );
}