query static method
Queries the SearchEndpoint for a List<String> for the term and
optional parameters.
Implementation
static Future<List<String>> query(String term, Map<String, String> apiKeys,
{Language language = Language.en_US,
bool prefix = false,
int? limit,
int? offset,
Iterable<String>? grammaticalFeatures,
PartOfSpeech? lexicalCategory,
Iterable<String>? domains}) async {
assert(limit == null || (limit < 5001 && limit >= 0),
'[limit] must be null or between 0 and 5,000 inclusive');
assert(offset == null || (offset < 10001 && offset >= 0),
'[offset] must be null or between 0 and 10,000 inclusive');
assert(((limit ?? 0) + (offset ?? 0) <= 10000),
'Sum of limit and offset must be less that 10,000');
return await SearchEndpoint._(
term, apiKeys, language, prefix, limit, offset)
.get() ??
[];
}