A fluent .NET Standard 2.1 SDK wrapper built with Refit for Lago API.
Via Nuget:
# Package Manager
Install-Package Lago.NET.Client
# dotnet
dotnet add package Lago.NET.Client
using Lago.NET.Client;
ILagoClient lagoClient = LagoClientFactory.Create("apiKey");
// Or with a custom host : LagoClientFactory.Create("apiKey", "https://api.getlago.com");
var addOnInput = new CreateAddOnInput("add_on_name", "add_on_code", 5000, "USD", "desc");
var result = await lagoClient.AddOns.CreateAsync(addOnInput);
// Startup.cs / Program.cs
using Lago.NET.Client.Extensions.DependencyInjection;
services.AddLagoClient((httpClient) => {
/* Custom httpClient configuration */},
"apiKey",
"https://api.getlago.com" );
// CustomService.cs
using Lago.NET.Client;
public CustomService
{
private readonly ILagoClient _lagoClient;
public CustomService(ILagoClient lagoClient)
{
_lagoClient = lagoClient;
}
}
Lago .NET client is distributed under the MIT license.