OwlBot class
OwlBot Instiantiate OwlBot with your token from https://owlbot.info to get clean interface with owlbot API
void main() async {
final OwlBot owlBot = OwlBot(token: "API_TOKEN");
final OwlBotResponse res = await owlBot.define(word: "owl");
print("Pronounciation: ${res.pronunciation}");
res.definitions.forEach((def) {
print(def.definition);
});
}
Constructors
- OwlBot({required String token})
- Instiantiate with token for owlbot API, you can receive from https://owlbot.info
Properties
- hashCode → int
-
The hash code for this object.
no setterinherited
- runtimeType → Type
-
A representation of the runtime type of the object.
no setterinherited
- token → String
-
token for owlbot API, you can receive from https://owlbot.info
final
Methods
-
define(
{required dynamic word}) → Future< OwlBotResponse?> -
Get the definitions for the
word
and returnsOwlBotResponse
which contains the pronounciation, and list ofDefinition
-
noSuchMethod(
Invocation invocation) → dynamic -
Invoked when a nonexistent method or property is accessed.
inherited
-
toString(
) → String -
A string representation of this object.
inherited
Operators
-
operator ==(
Object other) → bool -
The equality operator.
inherited