Pincho 1.0.0-alpha.14

This is a prerelease version of Pincho.
dotnet add package Pincho --version 1.0.0-alpha.14
                    
NuGet\Install-Package Pincho -Version 1.0.0-alpha.14
                    
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="Pincho" Version="1.0.0-alpha.14" />
                    
For projects that support PackageReference, copy this XML node into the project file to reference the package.
<PackageVersion Include="Pincho" Version="1.0.0-alpha.14" />
                    
Directory.Packages.props
<PackageReference Include="Pincho" />
                    
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 Pincho --version 1.0.0-alpha.14
                    
#r "nuget: Pincho, 1.0.0-alpha.14"
                    
#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 Pincho@1.0.0-alpha.14
                    
#: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=Pincho&version=1.0.0-alpha.14&prerelease
                    
Install as a Cake Addin
#tool nuget:?package=Pincho&version=1.0.0-alpha.14&prerelease
                    
Install as a Cake Tool

Pincho C# Library

Official .NET client for Pincho push notifications.

NuGet License

Installation

dotnet add package Pincho

Quick Start

using Pincho;

var client = new PinchoClient("YOUR_TOKEN");
await client.SendAsync("Deploy Complete", "Version 1.2.3 deployed");

// With full options
var notification = new Notification
{
    Title = "Deploy Complete",
    Message = "Version 1.2.3 deployed",
    Type = "deployment",
    Tags = new[] { "production", "backend" }
};
await client.SendNotificationAsync(notification);

Features

// All parameters
var notification = new Notification
{
    Title = "Deploy Complete",
    Message = "Version 1.2.3 deployed",
    Type = "deployment",
    Tags = new[] { "production", "backend" },
    ImageUrl = "https://example.com/success.png",
    ActionUrl = "https://example.com/deploy/123"
};
await client.SendNotificationAsync(notification);

// AI-powered notifications (NotifAI)
var response = await client.NotifAIAsync("deployment finished, v2.1.3 is live");
// response contains AI-generated notification structure

// Encrypted messages
var encrypted = new Notification
{
    Title = "Security Alert",
    Message = "Sensitive data",
    Type = "security",
    EncryptionPassword = "your_password"
};
await client.SendNotificationAsync(encrypted);

Configuration

// Default configuration
var client = new PinchoClient("abc12345");

// Custom timeout
var client = new PinchoClient("abc12345", TimeSpan.FromSeconds(60));

// Custom retry attempts
var httpClient = new HttpClient { BaseAddress = new Uri("https://api.pincho.app/") };
httpClient.DefaultRequestHeaders.Add("Authorization", "Bearer abc12345");
var client = new PinchoClient("abc12345", httpClient, 5);

Error Handling

Use typed exceptions for error handling:

try
{
    await client.SendAsync("Title", "Message");
}
catch (AuthenticationException ex)
{
    // Invalid token (401/403) - not retried
    Console.WriteLine($"Auth failed: {ex.Message}");
}
catch (RateLimitException ex)
{
    // Rate limited (429) - automatically retried with backoff
    Console.WriteLine($"Rate limited: {ex.Message}");
}
catch (ValidationException ex)
{
    // Invalid parameters (400) - not retried
    Console.WriteLine($"Validation error: {ex.Message}");
}
catch (ServerException ex)
{
    // Server error (5xx) - automatically retried
    Console.WriteLine($"Server error: {ex.Message}");
}
catch (NetworkException ex)
{
    // Network/timeout error - automatically retried
    Console.WriteLine($"Network error: {ex.Message}");
}

Automatic retry with exponential backoff for network errors, 5xx, and 429 (rate limit). Respects Retry-After headers.

ASP.NET Core Integration

// Program.cs
builder.Services.AddSingleton<IPinchoClient>(sp =>
    new PinchoClient(builder.Configuration["Pincho:Token"]!));

// Service
public class NotificationService(IPinchoClient client)
{
    public async Task NotifyAsync(string message) =>
        await client.SendAsync("Alert", message);
}

Requirements

  • .NET 6.0+
  • Zero external dependencies (System.Net.Http, System.Text.Json)
  • Full async/await with CancellationToken support
  • Nullable reference types enabled

License

MIT

Product Compatible and additional computed target framework versions.
.NET net8.0 is compatible.  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.  net9.0 was computed.  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 was computed.  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.
  • net8.0

    • No dependencies.

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.0-alpha.14 53 1/31/2026
1.0.0-alpha.1 52 1/31/2026