Chinese Zodiac API - Dart/Flutter Client
Chinese Zodiac returns the zodiac animal, element, and characteristics for any birth date. Accurately accounts for the Chinese lunar calendar - the zodiac year starts on Chinese New Year, not January 1st.
This is the Dart/Flutter client for the Chinese Zodiac API.
Installation
Add this to your pubspec.yaml:
dependencies:
apiverve_chinesezodiac: ^1.2.2
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage
import 'package:apiverve_chinesezodiac/apiverve_chinesezodiac.dart';
void main() async {
final client = ChinesezodiacClient('YOUR_API_KEY');
try {
final response = await client.execute({
'date': '1990-01-15'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response
{
"status": "ok",
"error": null,
"data": {
"date": "1990-01-15",
"zodiacYear": 1989,
"animal": "Snake",
"animalChinese": "蛇",
"element": "Earth",
"elementChinese": "土",
"elementColor": "Yellow/Brown",
"polarity": "Yin",
"traits": [
"Enigmatic",
"Intelligent",
"Wise",
"Decisive"
],
"sexagenaryCyclePosition": 6,
"fullName": "Earth Snake",
"chineseNewYear": "1990-01-27"
}
}
API Reference
- API Home: Chinese Zodiac API
- Documentation: docs.apiverve.com/ref/chinesezodiac
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_chinesezodiac
- Chinese Zodiac API client for Dart/Flutter