searchCollection method

Future<GiphyCollection> searchCollection(
  1. String query, {
  2. int offset = 0,
  3. int limit = _defaultLimit,
  4. GiphyRating rating = GiphyRating.g,
  5. String lang = GiphyLanguage.english,
  6. GiphyType type = GiphyType.gifs,
})

Retrieves a single collection page of the give search query.

Set the offset from which the page should be retrieved (default to 0).

Set the page size with limit (defaults to 30).

Compare search for optional settings.

Implementation

Future<GiphyCollection> searchCollection(
  String query, {
  int offset = 0,
  int limit = _defaultLimit,
  GiphyRating rating = GiphyRating.g,
  String lang = GiphyLanguage.english,
  GiphyType type = GiphyType.gifs,
}) =>
    _fetchCollection(
      _baseUri.replace(
        path: '$_apiVersion/${type.name}/search',
        queryParameters: <String, String>{
          'q': query,
          'offset': '$offset',
          'limit': '$limit',
          'rating': rating.name,
          'lang': lang,
        },
      ),
    );