autoComplete method

Future<List<String>> autoComplete(
  1. String search, {
  2. int limit = 20,
})

Returns response containing a list of completed search terms given a partial search term. The list is sorted by Tenor’s AI and the number of results will decrease as Tenor’s AI becomes more certain.

var api = Tenor(apiKey: 'Tenor Api');

List<String> autoCompletedItems = await api.autoComplete('un', limit: 5);

Implementation

Future<List<String>> autoComplete(
  String search, {
  int limit = 20,
}) async {
  var url =
      'https://g.tenor.com/v1/autocomplete?key=$apiKey&locale=$language&q=$search';
  return await _requestSearchSuggestions(
    url,
    limit: limit,
  );
}