FixerClient 1.0.0
Suggested Alternatives
dotnet add package FixerClient --version 1.0.0
NuGet\Install-Package FixerClient -Version 1.0.0
This command is intended to be used within the Package Manager Console in Visual Studio, as it uses the NuGet module's version of Install-Package.
<PackageReference Include="FixerClient" Version="1.0.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add FixerClient --version 1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: FixerClient, 1.0.0"
#r directive can be used in F# Interactive and Polyglot Notebooks. Copy this into the interactive tool or source code of the script to reference the package.
// Install FixerClient as a Cake Addin #addin nuget:?package=FixerClient&version=1.0.0 // Install FixerClient as a Cake Tool #tool nuget:?package=FixerClient&version=1.0.0
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Fixerr - An easy, minimal c# client for Fixer.io
Fixer is a popular freemium currency conversion site. Fixerr can help you to transform your currency faster 😋
Usage:
Requirements:
- API Key
Library Required Properties:
FixerEnvironment.ApiKey
FixerEnvironment.IsPaidSubscription
(If you bought the nonfree key and want to use https, you may want to set it to true)
Console Application Demo:
FixerEnvironment.ApiKey = "{your_api_key}";
FixerEnvironment.IsPaidSubscription = false;
var fixer = new FixerClient(new HttpClient());
var latest = await fixer.GetFluctuationAsync("2012-05-01", "2012-05-25");
Console.WriteLine(latest?.Rates);
Web Api
builder.Services.AddHttpClient();
FixerEnvironment.ApiKey = "{your_api_key}";
FixerEnvironment.IsPaidSubscription = true;
builder.Services.AddScoped<IFixerClient, FixerClient>();
and in the controller section:
private readonly IFixerClient _fixerClient;
public FixerController(IFixerClient fixerClient)
{
_fixerClient = fixerClient;
}
[HttpGet]
public async Task<IActionResult> Get()
{
var response = await _fixerClient.GetLatestAsync();
return Ok(response);
}
Best Practics:
- Make sure you use DI to inject HTTP Client. We prefer you will provide a Good HTTP Client instance.
- Set the
ApiKey
as string and paid subscriptionIsPaidSubscription
as true/false inFixerEnvironment
class. - If you have different API keys for different methods then you don't need to set
ApiKey
into theFixerEnvirnoment
, you will have to pass the API key as a parameter whenever you call any endpoints.
F.A.Q:
- There is also an optional apiKey parameter is added to every method if you need to access different methods with a different API key. 🎉
- If anything happens make sure to report using the Github issues. Thanks!
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net6.0 is compatible. net6.0-android was computed. net6.0-ios was computed. net6.0-maccatalyst was computed. net6.0-macos was computed. net6.0-tvos was computed. net6.0-windows was computed. net7.0 was computed. net7.0-android was computed. net7.0-ios was computed. net7.0-maccatalyst was computed. net7.0-macos was computed. net7.0-tvos was computed. net7.0-windows was computed. net8.0 was computed. net8.0-android was computed. net8.0-browser was computed. net8.0-ios was computed. net8.0-maccatalyst was computed. net8.0-macos was computed. net8.0-tvos was computed. net8.0-windows was computed. |
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.
-
net6.0
- System.Text.Json (>= 6.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.
Version | Downloads | Last updated | |
---|---|---|---|
1.0.0 | 503 | 3/17/2022 |