Dad Jokes API - Dart/Flutter Client
Dad Jokes delivers a random dad joke with every request. Send a plain GET call without parameters to receive a clean punchline ready for display.
This is the Dart/Flutter client for the Dad Jokes API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_dadjokes: ^1.2.3
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_dadjokes/apiverve_dadjokes.dart';
void main() async {
final client = DadjokesClient('YOUR_API_KEY');
try {
final response = await client.execute();
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"joke": "What state do crayons go to on vacation? Color-ado."
}
}
API Reference
- API Home: Dad Jokes API
- Documentation: docs.apiverve.com/ref/dadjokes
Authentication
All requests require an API key. Get yours at apiverve.com.
License
MIT License - see LICENSE for details.
Built with Dart for APIVerve
Libraries
- apiverve_dadjokes
- Dad Jokes API client for Dart/Flutter