OnCourse.ABConnect
2.0.0
dotnet add package OnCourse.ABConnect --version 2.0.0
NuGet\Install-Package OnCourse.ABConnect -Version 2.0.0
<PackageReference Include="OnCourse.ABConnect" Version="2.0.0" />
paket add OnCourse.ABConnect --version 2.0.0
#r "nuget: OnCourse.ABConnect, 2.0.0"
// Install OnCourse.ABConnect as a Cake Addin #addin nuget:?package=OnCourse.ABConnect&version=2.0.0 // Install OnCourse.ABConnect as a Cake Tool #tool nuget:?package=OnCourse.ABConnect&version=2.0.0
OnCourse.ABConnect
OnCourse.ABConnect is a .NET SDK library used to communicate with the Academic Benchmarks AB Connect API
✔ Features
Academic Benchmarks API library helps to generate requests for following services:
- authorities
- publications
- documents
- standards
- regions
- events
⭐ Installation
This project is a class library built for compatibility all the back to .NET 6.0.
To install the OnCourse.ABConnect NuGet package, run the following command via the dotnet CLI
dotnet add package OnCourse.ABConnect
Or run the following command in the Package Manager Console of Visual Studio
PM> Install-Package OnCourse.ABConnect
📕 General Usage
Initialization
To use ABConnect, import the namespace and include the .UseABConnect() method when initializing the host builder (typically found in the Program.cs file)
using OnCourse.ABConnect;
var host = Host.CreateDefaultBuilder(args)
.ConfigureServices((hostContext, services) =>
{
services.AddABConnect(hostContext.Configuration);
});
Fault Handling / Resilience
By default, the client will be configured to retry a call up to three times with increasing waits between (1s, 5s, 10s). If after the third call the service still returns an error then the call will be considered failed. You can override this policy during the UseABConnect method by passing in a policy as the second parameter. It is recommended to use Polly, a 3rd-party library, that has a lot of options for creating policies
services.UseABConnect(configuration, (p => p.WaitAndRetryAsync(new[]
{
TimeSpan.FromSeconds(1),
TimeSpan.FromSeconds(5),
TimeSpan.FromSeconds(10)
}));
Configuration
To use the API, you must add the Partner ID and Key in the appSettings.json file under the ABConnect section:
{
"ABConnect": {
"PartnerId": <YOUR_ID>,
"PartnerKey": <YOUR_KEY>
}
}
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 is compatible. 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. |
-
net6.0
- Ardalis.GuardClauses (>= 4.0.1)
- Microsoft.AspNetCore.WebUtilities (>= 2.2.0)
- Microsoft.Extensions.Configuration (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
- Microsoft.Extensions.Http.Polly (>= 7.0.5)
- Microsoft.Extensions.Options (>= 7.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
-
net7.0
- Ardalis.GuardClauses (>= 4.0.1)
- Microsoft.AspNetCore.WebUtilities (>= 2.2.0)
- Microsoft.Extensions.Configuration (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection (>= 7.0.0)
- Microsoft.Extensions.Http (>= 7.0.0)
- Microsoft.Extensions.Http.Polly (>= 7.0.5)
- Microsoft.Extensions.Options (>= 7.0.1)
- Microsoft.Extensions.Options.ConfigurationExtensions (>= 7.0.0)
- Newtonsoft.Json (>= 13.0.3)
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 |
---|---|---|
2.0.0 | 349 | 5/8/2023 |