searchForPhrase function

Future<JishoAPIResult> searchForPhrase(
  1. String phrase
)

Query the official Jisho API for a word or phrase

See https://jisho.org/forum/54fefc1f6e73340b1f160000-is-there-any-kind-of-search-api for discussion about the official API.

Implementation

Future<JishoAPIResult> searchForPhrase(String phrase) async {
  final uri = uriForPhraseSearch(phrase);
  return await http
      .get(uri)
      .then((response) => JishoAPIResult.fromJson(jsonDecode(response.body)));
}