apiverve_callingcode 1.2.2
apiverve_callingcode: ^1.2.2 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.
This is the Dart/Flutter client for the Country Calling Code API.
Installation #
Add this to your pubspec.yaml:
dependencies:
apiverve_callingcode: ^1.2.2
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 #
- API Home: Country Calling Code API
- Documentation: docs.apiverve.com/ref/callingcode
Authentication #
All requests require an API key. Get yours at apiverve.com.
License #
MIT License - see LICENSE for details.
Built with Dart for APIVerve