Nordigen.Net
0.12.0
dotnet add package Nordigen.Net --version 0.12.0
NuGet\Install-Package Nordigen.Net -Version 0.12.0
<PackageReference Include="Nordigen.Net" Version="0.12.0" />
paket add Nordigen.Net --version 0.12.0
#r "nuget: Nordigen.Net, 0.12.0"
// Install Nordigen.Net as a Cake Addin #addin nuget:?package=Nordigen.Net&version=0.12.0 // Install Nordigen.Net as a Cake Tool #tool nuget:?package=Nordigen.Net&version=0.12.0
Nordigen.Net
Unofficial .NET SDK for Nordigen. The only missing part are premiums. Because of the unclear documentation on the responses for them the Api, this library will remain on hold until further notice.
How to use it
1- Install the nuget package
Install-Package Nordigen.Net
2- Add a configuration section into your app, and configure it (the values shown below are the default ones except the keys)
"NordigenApi" : {
"Url" : "https://ob.nordigen.com/",
"SecretId" : "SOME_SECRET_ID_HERE",
"SecretKey" : "SOME_SECRET_KEY_HERE",
"AccessTokenValidBeforeSeconds" : 5,
"RefreshTokenValidBeforeSeconds" : 5
}
Although this is not required is recommended if you want to use an internal api to test.
3- Add the SDK to your services collection
services.AddNordigenApi();
4- Now you can access a set of interfaces to reach the Nordigen platform
INordigenApi => Just inject this and you can have access to all the endpoints with the members
IAccountsEndpoint => Access to Accounts
IInstitutionsEndpoint => Access to Institutions
IRequisitionsEndpoint => Access to Requisitions
IAgreementsEndpoint => Access to Agreements
Retries
You can easily plug retries with Polly when registering the api. Install the nuget package
Install-Package Microsoft.Extensions.Http.Polly
Configure your retries:
services
.AddNordigenApi()
.AddPolicyHandler(
HttpPolicyExtensions
.HandleTransientHttpError()
.OrResult(msg => msg.StatusCode == System.Net.HttpStatusCode.ServiceUnavailable)
.WaitAndRetryAsync(6, retryAttempt => TimeSpan.FromSeconds(Math.Pow(2,retryAttempt))));
Result handling
The library uses discriminated unions to return values, when the second option will allways be an Error if present.
For example when querying accounts:
var result = await _accountsEndpoint.Get(id, cancellationToken);
_ = result.Match(
account => async _ => { await _accountsDatabase.SaveAsync(account, cancellationToken); },
error => { _logger.Error(error.Detail); }
);
Token management
The SDK handles the lifetime/renewal of tokens automatically for you, so only requirement is to configure your SecretId and SecretKey
Credits
OneOf simplified credit goes to Harry McIntyre
Logo Provided by Vecteezy
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 was computed. net5.0-windows was computed. net6.0 was computed. 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. net9.0 was computed. net9.0-android was computed. net9.0-browser was computed. net9.0-ios was computed. net9.0-maccatalyst was computed. net9.0-macos was computed. net9.0-tvos was computed. net9.0-windows was computed. |
.NET Core | netcoreapp2.0 was computed. netcoreapp2.1 was computed. netcoreapp2.2 was computed. netcoreapp3.0 was computed. netcoreapp3.1 was computed. |
.NET Standard | netstandard2.0 is compatible. netstandard2.1 was computed. |
.NET Framework | net461 was computed. net462 was computed. net463 was computed. net47 was computed. net471 was computed. net472 was computed. net48 was computed. net481 was computed. |
MonoAndroid | monoandroid was computed. |
MonoMac | monomac was computed. |
MonoTouch | monotouch was computed. |
Tizen | tizen40 was computed. tizen60 was computed. |
Xamarin.iOS | xamarinios was computed. |
Xamarin.Mac | xamarinmac was computed. |
Xamarin.TVOS | xamarintvos was computed. |
Xamarin.WatchOS | xamarinwatchos was computed. |
-
.NETStandard 2.0
- Microsoft.AspNetCore.WebUtilities (>= 2.2.0)
- Microsoft.Extensions.Http (>= 2.2.0)
- Newtonsoft.Json (>= 13.0.1)
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 | |
---|---|---|---|
0.12.0 | 678 | 1/5/2023 | |
0.11.0 | 428 | 11/29/2022 | |
0.10.0 | 508 | 9/17/2022 | |
0.9.3 | 503 | 6/15/2022 | |
0.9.1 | 513 | 2/21/2022 | |
0.9.0 | 463 | 2/21/2022 | |
0.8.1 | 469 | 2/19/2022 | |
0.8.0 | 459 | 2/19/2022 | |
0.7.0 | 464 | 2/9/2022 | |
0.6.0 | 466 | 1/31/2022 | |
0.5.0 | 486 | 1/31/2022 | |
0.4.0 | 499 | 1/28/2022 | |
0.3.0 | 473 | 1/26/2022 | |
0.2.0 | 464 | 1/26/2022 | |
0.1.0 | 468 | 1/25/2022 |