Skip to main content

apiverve_magic8ball 1.2.5 copy "apiverve_magic8ball: ^1.2.5" to clipboard
apiverve_magic8ball: ^1.2.5 copied to clipboard

Magic 8-Ball is a fun tool that provides random predictions and answers like the classic toy. It returns one of 20 classic Magic 8-Ball responses categorized as affirmative, negative, or non-committal.

Magic 8-Ball API - Dart/Flutter Client #

Magic 8-Ball is a fun tool that provides random predictions and answers like the classic toy. It returns one of 20 classic Magic 8-Ball responses categorized as affirmative, negative, or non-committal.

pub package License: MIT

This is the Dart/Flutter client for the Magic 8-Ball API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_magic8ball: ^1.2.5

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_magic8ball/apiverve_magic8ball.dart';

void main() async {
  final client = Magic8ballClient('YOUR_API_KEY');

  try {
    final response = await client.execute({
      'question': 'Will it rain today?'
    });

    print('Status: ${response.status}');
    print('Data: ${response.data}');
  } catch (e) {
    print('Error: $e');
  }
}

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "question": "Will it rain today?",
    "answer": "Signs point to yes",
    "type": "affirmative",
    "certainty": "medium",
    "shake_count": 3,
    "timestamp": "2025-12-16T22:25:52.008Z"
  }
}

API Reference #

Authentication #

All requests require an API key. Get yours at apiverve.com.

License #

MIT License - see LICENSE for details.


Built with Dart for APIVerve

0
likes
0
points
652
downloads

Publisher

unverified uploader

Weekly Downloads

Magic 8-Ball is a fun tool that provides random predictions and answers like the classic toy. It returns one of 20 classic Magic 8-Ball responses categorized as affirmative, negative, or non-committal.

Homepage
Repository (GitHub)
View/report issues

License

unknown (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_magic8ball