apiverve_airportdistance 1.2.0 copy "apiverve_airportdistance: ^1.2.0" to clipboard
apiverve_airportdistance: ^1.2.0 copied to clipboard

Airport Distance is a simple tool for getting the distance between two airports. It returns the distance between the two airports.

Airport Distance API - Dart/Flutter Client #

Airport Distance is a simple tool for getting the distance between two airports. It returns the distance between the two airports.

pub package License: MIT

This is the Dart/Flutter client for the Airport Distance API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_airportdistance: ^1.2.0

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_airportdistance/apiverve_airportdistance.dart';

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

  try {
    final response = await client.execute({
      'iata1': 'JFK',
      'iata2': 'LAX'
    });

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

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "distanceMiles": 2470.23,
    "distanceKm": 3974.2,
    "distanceNauticalMiles": 2145.12,
    "estimatedFlightTime": "5h 24m",
    "timezoneDiffHours": -3,
    "bearing": 265,
    "direction": "West",
    "isInternational": false,
    "carbonEstimateKg": 543,
    "airport1": {
      "name": "John F Kennedy International Airport",
      "iata": "JFK",
      "icao": "KJFK",
      "city": "New York",
      "state": "New-York",
      "country": "US",
      "elevation": 13,
      "latitude": 40.63980103,
      "longitude": -73.77890015,
      "timezone": "America/New_York"
    },
    "airport2": {
      "name": "Los Angeles International Airport",
      "iata": "LAX",
      "icao": "KLAX",
      "city": "Los Angeles",
      "state": "California",
      "country": "US",
      "elevation": 125,
      "latitude": 33.94250107,
      "longitude": -118.4079971,
      "timezone": "America/Los_Angeles"
    }
  }
}

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
130
points
66
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Airport Distance is a simple tool for getting the distance between two airports. It returns the distance between the two airports.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_airportdistance