unofficial_jisho_api_dart/example/example_search_example.dart

18 lines
456 B
Dart

import 'dart:convert' show jsonEncode;
import 'package:unofficial_jisho_api/api.dart' as jisho;
void main() async {
await jisho.searchForExamples('').then((result) {
print('Jisho Uri: ' + result.uri);
print('');
for (int i = 0; i < 3; i++) {
var example = result.results[i];
print(example.kanji);
print(example.kana);
print(example.english);
print(jsonEncode(example.pieces));
print('');
}
});
}