apiverve_moonposition 1.2.5
apiverve_moonposition: ^1.2.5 copied to clipboard
Moon Position calculates the moon's altitude in the sky for any latitude and longitude coordinates. Provide an optional time of day to determine lunar elevation; paid plans add custom dates, azimuth, [...]
Moon Position API - Dart/Flutter Client #
Moon Position calculates the moon's altitude in the sky for any latitude and longitude coordinates. Provide an optional time of day to determine lunar elevation; paid plans add custom dates, azimuth, and distance.
This is the Dart/Flutter client for the Moon Position API.
Installation #
Add this to your pubspec.yaml:
dependencies:
apiverve_moonposition: ^1.2.5
Then run:
dart pub get
# or for Flutter
flutter pub get
Usage #
import 'package:apiverve_moonposition/apiverve_moonposition.dart';
void main() async {
final client = MoonpositionClient('YOUR_API_KEY');
try {
final response = await client.execute({
'lat': 37.7749,
'lon': -122.4194,
'date': '01-16-2026',
'time': '14:30',
'timezone': 'America/Los_Angeles'
});
print('Status: ${response.status}');
print('Data: ${response.data}');
} catch (e) {
print('Error: $e');
}
}
Response #
{
"status": "ok",
"error": null,
"data": {
"date": "01-22-2026",
"time": "14:30",
"coordinates": {
"latitude": 37.7749,
"longitude": -122.4194
},
"moon": {
"altitude": -0.407908976399288,
"azimuth": 1.4720499058762104,
"distance": 404332.6834067969
}
}
}
API Reference #
- API Home: Moon Position API
- Documentation: docs.apiverve.com/ref/moonposition
Authentication #
All requests require an API key. Get yours at apiverve.com.
License #
MIT License - see LICENSE for details.
Built with Dart for APIVerve