GammaReportLibrary 1.0.1

dotnet add package GammaReportLibrary --version 1.0.1
                    
NuGet\Install-Package GammaReportLibrary -Version 1.0.1
                    
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="GammaReportLibrary" Version="1.0.1" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="GammaReportLibrary" Version="1.0.1" />
                    
Directory.Packages.props
<PackageReference Include="GammaReportLibrary" />
                    
Project file
For projects that support Central Package Management (CPM), copy this XML node into the solution Directory.Packages.props file to version the package.
paket add GammaReportLibrary --version 1.0.1
                    
#r "nuget: GammaReportLibrary, 1.0.1"
                    
#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.
#:package GammaReportLibrary@1.0.1
                    
#:package directive can be used in C# file-based apps starting in .NET 10 preview 4. Copy this into a .cs file before any lines of code to reference the package.
#addin nuget:?package=GammaReportLibrary&version=1.0.1
                    
Install as a Cake Addin
#tool nuget:?package=GammaReportLibrary&version=1.0.1
                    
Install as a Cake Tool

GammaReportLibrary

Libreria .NET 10 para consumir Gamma Public API con enfoque de clean architecture, superficie tipada (IGammaClient) y acceso de bajo nivel (IGammaRawClient) para paridad completa.

Que incluye hoy

  • Cliente tipado para endpoints principales de Gamma API.
  • Cliente raw para request/response completo.
  • Mapeo de errores HTTP a excepciones de dominio.
  • Retry/backoff para 429 y 5xx configurable.
  • Exposicion de metadatos de rate limit.

Instalacion en la solucion

Actualmente el repositorio esta organizado por proyectos en src/.

Registro por DI

La extension de registro vive en infraestructura.

using GammaReportLibrary.Infrastructure.DependencyInjection;

var services = new ServiceCollection();

services.AddGammaReportLibrary(options =>
{
    options.ApiKey = "sk-gamma-xxxxx";
    options.BaseUrl = "https://public-api.gamma.app/v1.0";
    options.MaxRetryAttempts = 2;
    options.RetryBaseDelay = TimeSpan.FromSeconds(1);
    options.RetryMaxDelay = TimeSpan.FromSeconds(30);
    options.DefaultPollingInterval = TimeSpan.FromSeconds(5);
    options.DefaultWaitTimeout = TimeSpan.FromMinutes(5);
});

Uso rapido

using GammaReportLibrary.Abstractions;
using GammaReportLibrary.Models.Generations;

var provider = services.BuildServiceProvider();
var client = provider.GetRequiredService<IGammaClient>();

var started = await client.CreateGenerationAsync(new CreateGenerationRequest
{
    InputText = "Q3 product launch strategy",
    TextMode = "generate",
    Format = "presentation",
    NumCards = 10,
    ExportAs = "pdf"
});

var done = await client.WaitForCompletionAsync(started.Data.GenerationId);

Console.WriteLine($"Status: {done.Data.Status}");
Console.WriteLine($"Gamma URL: {done.Data.GammaUrl}");
Console.WriteLine($"Export URL: {done.Data.ExportUrl}");

Sample ejecutable

Existe un ejemplo minimo listo para ejecutar en:

  • samples/GammaReportLibrary.Sample

Variables necesarias:

  • GAMMA_API_KEY

Ejecucion:

export GAMMA_API_KEY="sk-gamma-xxxxx"
dotnet run --project samples/GammaReportLibrary.Sample/GammaReportLibrary.Sample.csproj

Errores mapeados

El cliente tipado lanza excepciones de dominio en no-exito HTTP:

  • GammaBadRequestException (400)
  • GammaUnauthorizedException (401)
  • GammaInsufficientCreditsException (402)
  • GammaForbiddenException (403)
  • GammaNotFoundException (404)
  • GammaRateLimitException (429)
  • GammaServerException (5xx)

Documentacion en IDE

Los tipos publicos estan preparados para documentacion de IntelliSense via comentarios XML. La guia de consumo de alto nivel se mantiene en este README.

Estado

Base de implementacion activa. Se continua ampliando cobertura de paridad endpoint-parametro-campo en la planificacion interna del proyecto.

Product Compatible and additional computed target framework versions.
.NET 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. 
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
1.0.1 131 7/4/2026