GoAffPro.Client
0.3.0-dev2
dotnet add package GoAffPro.Client --version 0.3.0-dev2
NuGet\Install-Package GoAffPro.Client -Version 0.3.0-dev2
<PackageReference Include="GoAffPro.Client" Version="0.3.0-dev2" />
<PackageVersion Include="GoAffPro.Client" Version="0.3.0-dev2" />
<PackageReference Include="GoAffPro.Client" />
paket add GoAffPro.Client --version 0.3.0-dev2
#r "nuget: GoAffPro.Client, 0.3.0-dev2"
#:package GoAffPro.Client@0.3.0-dev2
#addin nuget:?package=GoAffPro.Client&version=0.3.0-dev2&prerelease
#tool nuget:?package=GoAffPro.Client&version=0.3.0-dev2&prerelease
GoAffPro.Client
Async-first .NET client for GoAffPro using Kiota-generated models plus a thin wrapper for auth and polling observers.
Targets
net9.0net10.0
Install
dotnet add package GoAffPro.Client
Quick Start
using GoAffPro.Client;
await using var client = new GoAffProClient(new GoAffProClientOptions
{
BearerToken = "your-access-token",
});
// Or login first:
string token = await client.LoginAsync("affiliate@example.com", "password123");
API Usage
Use the generated API root from the wrapper:
var sites = await client.Api.User.Sites.GetAsync(config =>
{
config.QueryParameters.Limit = 20;
config.QueryParameters.Offset = 0;
});
Wrapper helpers:
LoginAsync(email, password, ct)SetBearerToken(token)
Observer Usage
Stream-based:
await foreach (var order in client.NewOrdersAsync(
pollingInterval: TimeSpan.FromSeconds(30),
pageSize: 100,
cancellationToken: cancellationToken))
{
Console.WriteLine(order.Id?.String);
}
Event-based:
client.OrderDetected += (_, e) => Console.WriteLine(e.Order.Id?.String);
client.AffiliateDetected += (_, e) => Console.WriteLine(e.Affiliate.AffiliateId?.String);
await client.StartEventObserverAsync(
pollingInterval: TimeSpan.FromSeconds(30),
pageSize: 100,
cancellationToken: cancellationToken);
Backfill controls:
OrderObserverStartTimeAffiliateObserverStartTimePayoutObserverStartTime
Dependency Injection
services.AddGoAffProClient(options =>
{
options.BaseUrl = new Uri("https://api.goaffpro.com/v1/", UriKind.Absolute);
options.BearerToken = configuration["GoAffPro:Token"];
options.Timeout = TimeSpan.FromSeconds(30);
});
Example App
Project: examples/GoAffPro.Client.Example
Interactive mode:
dotnet run --project examples/GoAffPro.Client.Example
CLI sweep mode:
dotnet run --project examples/GoAffPro.Client.Example -- \
--run-tests \
--access_token=env:GOAFFPRO_TEST_TOKEN \
--products-timeout-seconds=90 \
--output=api-sweep.json
Build-Time Generation
Generation is handled by src/GoAffPro.Client.Generated/GoAffPro.Client.Generated.csproj:
- Uses local canonical spec:
openapi/goaffpro-canonical.yaml - Runs Kiota during build
- Writes generated sources under
src/GoAffPro.Client.Generated/Generated
Do not manually edit generated files.
Testing
Unit tests:
dotnet test tests/GoAffPro.Client.Tests/GoAffPro.Client.Tests.csproj
Integration tests:
dotnet test tests/GoAffPro.Client.IntegrationTests/GoAffPro.Client.IntegrationTests.csproj --filter "Category=Integration"
Integration auth sources:
GOAFFPRO_TEST_TOKENGOAFFPRO_TEST_EMAIL+GOAFFPRO_TEST_PASSWORDtests/GoAffPro.Client.IntegrationTests/appsettings.Test.local.json(template:appsettings.Test.local.example.json)
Known Upstream Instability
Tracked in openapi/goaffpro-canonical.yaml comments:
/user/feed/productscan time out/user/feed/rewardscan return 404/non-JSON/user/feed/transactionscan return 500 with non-JSON payload/user/payouts/pendingtracked as parity endpoint also seen under/sdk/user/*
| Product | Versions Compatible and additional computed target framework versions. |
|---|---|
| .NET | net9.0 is compatible. 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. net10.0 is compatible. net10.0-android was computed. net10.0-browser was computed. net10.0-ios was computed. net10.0-maccatalyst was computed. net10.0-macos was computed. net10.0-tvos was computed. net10.0-windows was computed. |
-
net10.0
- GoAffPro.Client.Generated (>= 1.0.0)
- Microsoft.Extensions.Http.Polly (>= 10.0.0)
- Microsoft.Kiota.Abstractions (>= 1.21.2)
- Microsoft.Kiota.Http.HttpClientLibrary (>= 1.21.2)
- Polly (>= 8.4.2)
- Polly.Extensions.Http (>= 3.0.0)
-
net9.0
- GoAffPro.Client.Generated (>= 1.0.0)
- Microsoft.Extensions.Http.Polly (>= 10.0.0)
- Microsoft.Kiota.Abstractions (>= 1.21.2)
- Microsoft.Kiota.Http.HttpClientLibrary (>= 1.21.2)
- Polly (>= 8.4.2)
- Polly.Extensions.Http (>= 3.0.0)
- System.Text.Json (>= 10.0.0)
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.3.0-dev2 | 0 | 2/25/2026 |
| 0.3.0-dev1 | 0 | 2/25/2026 |
| 0.2.1-dev1 | 41 | 2/22/2026 |
| 0.2.0 | 45 | 2/18/2026 |