revan_client 0.1.0+1
revan_client: ^0.1.0+1 copied to clipboard
Dart client for Revan API.
Revan API client #
Dart Client for Revan API.
Getting started #
To use this plugin, add revan_client as a dependency in your pubspec.yaml file.
Also you need URL for working Revan API backend instance.
Usage #
// Create RevanApi instance
// It is recommended to create only one instance and reuse it
final api = RevanApi(apiUrl: 'https://api.example.com');
// Invoke relevant endpoint
final res = await api.trubar.find('lahko');
// Process the response
if (res.isValue) {
// Succeed
final data = res.asValue!.value;
// Process data
} else {
// Failed, field error contains ErrorResponse
print("Error: ${res.asError!.error}");
}
// Dispose api object when you no longer need it
api.dispose();
Features #
Trubar #
find()- Returns list of words that match the query.wordData()- Returns detailed information about the word.