Skip to main content

apiverve_callingcode 1.2.3 copy "apiverve_callingcode: ^1.2.3" to clipboard
apiverve_callingcode: ^1.2.3 copied to clipboard

Country Calling Code is a phone number country code API that looks up international dialing codes and official names from a two-letter ISO country code. It returns an array of calling prefixes and sta [...]

Country Calling Code API - Dart/Flutter Client #

Country Calling Code is a phone number country code API that looks up international dialing codes and official names from a two-letter ISO country code. It returns an array of calling prefixes and standard country identifiers.

pub package License: MIT

This is the Dart/Flutter client for the Country Calling Code API.

Installation #

Add this to your pubspec.yaml:

dependencies:
  apiverve_callingcode: ^1.2.3

Then run:

dart pub get
# or for Flutter
flutter pub get

Usage #

import 'package:apiverve_callingcode/apiverve_callingcode.dart';

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

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

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

Response #

{
  "status": "ok",
  "error": null,
  "data": {
    "country": "France",
    "officialName": "French Republic",
    "countryCode": "FR",
    "callingcodes": [
      "+33"
    ],
    "region": "Europe",
    "subregion": "Western Europe"
  }
}

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
116
downloads

Documentation

API reference

Publisher

verified publisherapiverve.com

Weekly Downloads

Country Calling Code is a phone number country code API that looks up international dialing codes and official names from a two-letter ISO country code. It returns an array of calling prefixes and standard country identifiers.

Homepage
Repository (GitHub)
View/report issues
Contributing

License

MIT (license)

Dependencies

http, http_parser

More

Packages that depend on apiverve_callingcode