APIAlerts 1.0.0-alpha3

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

apialerts-csharp

C# client for the apialerts.com platform

DocsGitHubNuget

Overview

The APIAlerts NuGet package simplifies the process of setting up and managing alerts within your API projects. It provides functionalities to activate the package with an API key and offers methods for publishing alerts asynchronously and synchronously.

Installation

APIAlerts is available as a NuGet package. You can install it using the following command:

PM> Install-Package APIAlerts

Initialize the client

The client is implemented as a singleton, ensuring that only one instance is created and used throughout the application.

// Initialise the ApiAlerts client with your API key
APIAlerts.Client.Configure(yourApiKey);

// You can enable debug mode to see logs messages using the additional debug parameter
APIAlerts.Client.Configure(yourApiKey, true);

Send Events

You can send alerts by constructing the AlertEvent class and passing it to the Send() function.

var alert = new APIAlerts.Alert
{
    Message = "My alert message",       // required message
    Channel = "my-channel-identifier",  // optional, uses the default channel if not provided
    Tags = new[] { "tag1", "tag2" },    // optional
    Link = "https://example.com"        // optional
};

APIAlerts.Client.Send(alert);

The APIAlerts.Client.SendAsync() methods are also available if you need to wait for a successful execution. However, the Send() functions are generally always preferred.

Send with API Key functions

You may have the need to talk to different API Alerts workspaces in your application. You can use the SendWithApiKey() functions to send alerts to override the default API key for that single send call.

APIAlerts.Client.SendWithApiKey("other_api_key", alert);

Feedback & Support

If you have any questions or feedback, please create an issue on our GitHub repository. We are always looking to improve our service and would love to hear from you. Thanks for using API Alerts!

Product Compatible and additional computed target framework versions.
.NET 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.  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.
  • net6.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-alpha3 111 1/22/2025
1.0.0-alpha2 101 1/22/2025
1.0.0-alpha1 83 1/22/2025