searchCollection method
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,
},
),
);