Nordigen.Net 0.12.0

dotnet add package Nordigen.Net --version 0.12.0
NuGet\Install-Package Nordigen.Net -Version 0.12.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="Nordigen.Net" Version="0.12.0" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Nordigen.Net --version 0.12.0
#r "nuget: Nordigen.Net, 0.12.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 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 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. 
.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. 
Compatible target framework(s)
Included target framework(s) (in package)
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
0.12.0 551 1/5/2023
0.11.0 391 11/29/2022
0.10.0 470 9/17/2022
0.9.3 466 6/15/2022
0.9.1 478 2/21/2022
0.9.0 431 2/21/2022
0.8.1 436 2/19/2022
0.8.0 421 2/19/2022
0.7.0 428 2/9/2022
0.6.0 431 1/31/2022
0.5.0 452 1/31/2022
0.4.0 458 1/28/2022
0.3.0 439 1/26/2022
0.2.0 430 1/26/2022
0.1.0 437 1/25/2022