FixerClient 1.0.0

.NET 6.0
Suggested Alternatives

Fixerr

Install-Package FixerClient -Version 1.0.0
dotnet add package FixerClient --version 1.0.0
<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, C# scripting and .NET Interactive. 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 subscription IsPaidSubscription as true/false in FixerEnvironment class.
  • If you have different API keys for different methods then you don't need to set ApiKey into the FixerEnvirnoment, 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
.NET net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.

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 96 3/17/2022