owlbot_dart 1.1.1 copy "owlbot_dart: ^1.1.1" to clipboard
owlbot_dart: ^1.1.1 copied to clipboard

outdated

A clean and simple interface to interact with owlbot.info, dictionary API. Returns response in nice formatted dart objects

example/lib/main.dart

import 'package:owlbot_dart/owlbot_dart.dart';

///A pure dart script that fetches definition of a word from https://owlbot.info API
///
///This showcases how to use `owlbot_dart` library

Future<void> main() async {
  /// Instiantiate the `OwlBot` with [token] which you can get for free from https://owlbot.info
  final OwlBot owlBot = OwlBot(token: "API_TOKEN");

  /// Using the [define] function, get the definitions of the provided [word]
  /// [OwlBotResponse] object is returned
  final OwlBotResponse res = await owlBot.define(word: "owl");
  print("Pronounciation: ${res.pronunciation}");
  res.definitions.forEach((def) {
    print(def.definition);
  });
}
9
likes
40
pub points
0%
popularity

Publisher

verified publisherdlohani.com.np

A clean and simple interface to interact with owlbot.info, dictionary API. Returns response in nice formatted dart objects

Homepage
Repository (GitHub)
View/report issues

License

MIT (license)

Dependencies

meta, restio

More

Packages that depend on owlbot_dart