Official C# SDK for the Finturest Country API - supports .NET Standard 2.0+ and all modern .NET versions.
This SDK offers seamless integration with the Finturest Country API, enabling access to up-to-date and structured data for all countries and territories. It supports .NET Standard 2.0 and later, ensuring compatibility with .NET Core and the latest .NET releases.
-
Global Coverage: Provides information on all 249 countries and territories worldwide.
-
Standardized Country Codes: Supports ISO 3166-1 alpha-2, alpha-3, and numeric codes.
-
Currency & Language Metadata: Includes official currencies, languages, and region details per country.
-
Geopolitical Details: Returns data on capitals, time zones, regional blocks, and more.
-
Reliable Data Source: Aggregated from trusted international standards and regularly updated.
Using the .NET Core command-line interface (CLI) tools:
dotnet add package Finturest.Country
Using the NuGet Command Line Interface (CLI):
nuget install Finturest.Country
Using the Package Manager Console:
Install-Package Finturest.Country
From within Visual Studio:
- Open the Solution Explorer.
- Right-click on a project within your solution.
- Click on Manage NuGet Packages...
- Click on the Browse tab and search for "Finturest.Country".
- Click on the Finturest.Country package, select the appropriate version in the right-tab and click Install.
To use the Finturest.Country
client, register it in your application's dependency injection container using AddFinturestCountry
. This configures the services required to communicate with the Finturest Country API.
var services = new ServiceCollection();
services.AddFinturestCountry(options =>
{
options.ApiKey = "YOUR_API_KEY";
});
Note
ICountryServiceClient
is registered in the DI container and should be resolved via dependency injection.
In ASP.NET Core applications, it's recommended to inject it through constructor injection.
Note
The abstractions for the Finturest Country API client are provided in a separate package namedFinturest.Country.Abstractions
.
You can reference this package in your business layer to avoid a tight dependency on the implementation.
Only the root application or composition root should reference the fullFinturest.Country
package that contains the implementation.
To get countries using the Finturest Country API, call the GetCountriesAsync
method on the ICountryServiceClient
.
var serviceProvider = services.BuildServiceProvider();
var countryServiceClient = serviceProvider.GetRequiredService<ICountryServiceClient>();
var result = await countryServiceClient.GetCountriesAsync();
Console.WriteLine($"Countries: {result.Count}.");
Note
In production applications, avoid usingBuildServiceProvider()
manually.
Instead, use constructor injection to getICountryServiceClient
from the framework’s dependency injection system.
To get access to the Finturest Country API or subscribe to a plan, please visit the subscription page. An active subscription is required to access the API in production.
An API key is required to use the SDK and can be generated on your Finturest dashboard:
For full API reference and usage guides, please visit the official Finturest Country API documentation:
For support, questions, or inquiries, please contact us at: [email protected]