unofficial_jisho_api_dart/example/example_search_example.dart

19 lines
490 B
Dart
Raw Permalink Normal View History

2020-06-23 12:46:19 +02:00
import 'dart:convert' show jsonEncode;
import 'package:unofficial_jisho_api/unofficial_jisho_api.dart';
final jisho = JishoApi();
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('');
}
});
}