unofficial_jisho_api_dart/example/api/kanji_search.dart

23 lines
1.0 KiB
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.searchForKanji('').then((result) {
2020-06-26 01:59:23 +02:00
print('Found: ${result.found}');
print('Taught in: ${result.taughtIn}');
print('JLPT level: ${result.jlptLevel}');
print('Newspaper frequency rank: ${result.newspaperFrequencyRank}');
print('Stroke count: ${result.strokeCount}');
print('Meaning: ${result.meaning}');
print('Kunyomi: ${jsonEncode(result.kunyomi)}');
print('Kunyomi example: ${jsonEncode(result.kunyomiExamples[0])}');
print('Onyomi: ${jsonEncode(result.onyomi)}');
print('Onyomi example: ${jsonEncode(result.onyomiExamples[0])}');
print('Radical: ${jsonEncode(result.radical)}');
print('Parts: ${jsonEncode(result.parts)}');
print('Stroke order diagram: ${result.strokeOrderDiagramUri}');
print('Stroke order SVG: ${result.strokeOrderSvgUri}');
print('Stroke order GIF: ${result.strokeOrderGifUri}');
print('Jisho Uri: ${result.uri}');
2020-06-23 12:46:19 +02:00
});
}