Forbury.Integrations
1.4.3
See the version list below for details.
dotnet add package Forbury.Integrations --version 1.4.3
NuGet\Install-Package Forbury.Integrations -Version 1.4.3
<PackageReference Include="Forbury.Integrations" Version="1.4.3" />
paket add Forbury.Integrations --version 1.4.3
#r "nuget: Forbury.Integrations, 1.4.3"
// Install Forbury.Integrations as a Cake Addin #addin nuget:?package=Forbury.Integrations&version=1.4.3 // Install Forbury.Integrations as a Cake Tool #tool nuget:?package=Forbury.Integrations&version=1.4.3
Forbury Integrations
This .NET client library provides a quick & easy option for integrating with Forbury APIs.
Note: In order to use this library, you must be an existing Forbury customer and have an API ClientId
and ClientSecret
.
To learn more about becoming a Forbury customer, or if you already are and would like access, please contact us.
Documentation
Wiki page - Contains full documentation including examples.
Swagger API documentation - Contains the ability for sample requests and available endpoints.
Quick Start Guide
In order to get started, please follow these steps.
1. Install the NuGet package using one of the following commands
Package Manager
Install-Package Forbury.Integrations -Version 1.2.0
.NET CLI
dotnet add PROJECT package Forbury.Integrations --version 1.2.0
PackageReference
<PackageReference Include="Forbury.Integrations" Version="1.2.0" />
For a full list of the latest releases, please see the package release page.
2. Add the following to your appsettings.config
(replace YOUR_CLIENT_ID
and YOUR_CLIENT_SECRET
)
"Forbury": {
"Api": {
"Url": "https://api.forbury.com/",
"Version": 1
},
"Authentication": {
"Url": "https://account.forbury.com/",
"ClientId": "YOUR_CLIENT_ID",
"ClientSecret": "YOUR_CLIENT_SECRET"
}
}
3. Add the following inside your Startup.cs
(.NET 3.1 and .NET 5).
public IConfiguration Configuration { get; }
public void ConfigureServices(IServiceCollection services)
{
services.AddForburyApi(Configuration);
...
}
Alternatively, if you are using the new .NET 6 design without a Startup.cs
, add the following inside your Program.cs
(.NET 6).
using Forbury.Integrations.API;
var builder = WebApplication.CreateBuilder(args);
builder.Services.AddForburyApi(builder.Configuration);
You should now be ready to use the API!
Example API Usage
Example usage inside a Service.
Note: Please take note of the using statements, its important to import usings from the correct version (see versions below).
using Forbury.Integrations.API.v1.Dto;
using Forbury.Integrations.API.v1.Interfaces;
...
public class ForburyDataService
{
private readonly IForburyTeamApiClient _forburyTeamApiClient;
public ForburyDataService(IForburyTeamApiClient forburyTeamApiClient)
{
_forburyTeamApiClient = forburyTeamApiClient;
}
public async Task GetTeams(int amount = 20, int page = 1)
{
PagedResult<TeamDto> teams = await _forburyTeamApiClient.GetTeams(amount, page);
// Do work here
...
}
public async Task GetModelDataForTeam(int id, DateTime? fromDate = null, int amount = 20, int page = 1)
{
PagedResult<ModelDto> models = await _forburyTeamApiClient.GetModelsByTeamId(id, fromDate, null, amount, page);
// Do work here
...
}
}
Versions
Currently available API versions:
- v1
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net5.0 is compatible. net5.0-windows was computed. 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. |
.NET Core | netcoreapp3.1 is compatible. |
-
.NETCoreApp 3.1
- IdentityServer4.Storage (>= 3.1.2)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Http.Extensions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 3.1.9)
- Microsoft.Extensions.Http (>= 3.1.9)
- Newtonsoft.Json (>= 13.0.1)
- System.Net.Http (>= 4.3.4)
-
net5.0
- IdentityServer4.Storage (>= 3.1.2)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Http.Extensions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 3.1.9)
- Microsoft.Extensions.Http (>= 3.1.9)
- Newtonsoft.Json (>= 13.0.1)
- System.Net.Http (>= 4.3.4)
-
net6.0
- IdentityServer4.Storage (>= 3.1.2)
- Microsoft.AspNetCore.Http.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Http.Extensions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Abstractions (>= 2.2.0)
- Microsoft.AspNetCore.Mvc.Core (>= 2.2.5)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 3.1.9)
- Microsoft.Extensions.Http (>= 3.1.9)
- Newtonsoft.Json (>= 13.0.1)
- System.Net.Http (>= 4.3.4)
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.7.3 | 101 | 11/5/2024 |
1.7.2 | 413 | 7/23/2024 |
1.7.1 | 387 | 1/24/2024 |
1.7.0 | 130 | 1/17/2024 |
1.6.0 | 1,945 | 1/30/2023 |
1.6.0-beta | 141 | 1/18/2023 |
1.5.0 | 401 | 12/9/2022 |
1.5.0-beta5 | 150 | 12/9/2022 |
1.5.0-beta4 | 133 | 12/7/2022 |
1.5.0-beta3 | 236 | 11/23/2022 |
1.5.0-beta2 | 152 | 11/11/2022 |
1.5.0-beta | 237 | 11/8/2022 |
1.4.3 | 359 | 12/5/2022 |
1.4.2 | 347 | 12/2/2022 |
1.4.1 | 385 | 10/26/2022 |
1.4.0 | 772 | 9/1/2022 |
1.3.0 | 630 | 8/4/2022 |
1.2.1 | 472 | 7/25/2022 |
1.2.0 | 529 | 7/24/2022 |
1.1.0 | 564 | 7/7/2022 |
1.0.7 | 463 | 6/27/2022 |
1.0.6 | 886 | 4/11/2022 |
1.0.5 | 640 | 3/29/2022 |
1.0.4 | 464 | 1/30/2022 |
1.0.3 | 391 | 7/6/2021 |
1.0.2 | 367 | 6/21/2021 |
1.0.1 | 1,996 | 5/17/2021 |
1.0.0 | 353 | 5/5/2021 |