unofficial_jisho_api_dart/example/api/example_search.dart

18 lines
456 B
Dart
Raw Normal View History

2020-06-23 12:46:19 +02:00
import 'dart:convert' show jsonEncode;
2020-06-25 22:42:16 +02:00
import 'package:unofficial_jisho_api/api.dart' as jisho;
2020-06-23 12:46:19 +02:00
void main() async {
await jisho.searchForExamples('').then((result) {
2020-06-26 01:59:23 +02:00
print('Jisho Uri: ${result.uri}');
2020-06-23 12:46:19 +02:00
print('');
2020-06-25 23:01:38 +02:00
for (var i = 0; i < 3; i++) {
2020-06-23 12:46:19 +02:00
var example = result.results[i];
print(example.kanji);
print(example.kana);
print(example.english);
print(jsonEncode(example.pieces));
print('');
}
});
}