wallhaven_api 0.1.0 wallhaven_api: ^0.1.0 copied to clipboard
Wallhaven API wrapper for the Dart programming language.
example/wallhaven_api_example.dart
import 'package:wallhaven_api/wallhaven_api.dart';
void main() async {
WallhavenApiClient api = WallhavenApiClient();
try {
Wallpaper wallpaper = await api.wallpaper('id');
print(wallpaper.data.path);
} catch (e) {
if (e is WallhavenException) {
print(e.error);
}
}
}