Skip to main content

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

Country Borders identifies adjacent nations by two-letter ISO country code. It returns the list of bordering countries along with region, subregion, and landlocked status.

Country Borders API - Dart/Flutter Client #

Country Borders identifies adjacent nations by two-letter ISO country code. It returns the list of bordering countries along with region, subregion, and landlocked status.

pub package License: MIT

This is the Dart/Flutter client for the Country Borders API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_countryborders: ^1.2.5

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_countryborders/apiverve_countryborders.dart';

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

  try {
    final response = await client.execute({
      'country': 'CA'
    });

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

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "country": "Canada",
    "cca2": "CA",
    "landlocked": false,
    "region": "Americas",
    "subregion": "Northern America",
    "coordinates": {
      "lat": 60,
      "lng": -95
    },
    "borders": [
      "USA"
    ]
  }
}

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
1.02k
downloads

Documentation

API reference

Publisher

unverified uploader

Weekly Downloads

Country Borders identifies adjacent nations by two-letter ISO country code. It returns the list of bordering countries along with region, subregion, and landlocked status.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_countryborders