Teams.Notifications
0.1.1
.NET Core 2.1
Install-Package Teams.Notifications -Version 0.1.1
dotnet add package Teams.Notifications --version 0.1.1
<PackageReference Include="Teams.Notifications" Version="0.1.1" />
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add Teams.Notifications --version 0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
#r "nuget: Teams.Notifications, 0.1.1"
#r directive can be used in F# Interactive, C# scripting and .NET Interactive. Copy this into the interactive tool or source code of the script to reference the package.
// Install Teams.Notifications as a Cake Addin
#addin nuget:?package=Teams.Notifications&version=0.1.1
// Install Teams.Notifications as a Cake Tool
#tool nuget:?package=Teams.Notifications&version=0.1.1
The NuGet Team does not provide support for this client. Please contact its maintainers for support.
Teams Notification
Introduction
Library to easily send notification to Microsoft Teams channels.
Code Samples
var url = "<INSERT WEBHOOK URL HERE>";
var client = new TeamsNotificationClient(url);
var message = new MessageCard();
message.Title = "title";
message.Text = "text";
message.Color = "f0ad4e";
message.Sections = new List<MessageSection>();
message.Sections.Add(new MessageSection()
{
Title = "Context",
Facts = new List<MessageFact>()
{
new MessageFact()
{
Name = "Key",
Value = "Value"
}
}
});
message.PotentialActions = new List<PotentialAction>();
message.PotentialActions.Add(new PotentialAction()
{
Name = "Open",
Targets = new List<PotentialActionLink>()
{
new PotentialActionLink()
{
Value = "http://google.com"
}
}
});
client.PostMessage(message).GetAwaiter().GetResult();
Installation
dotnet add package Teams.Notifications
Product | Versions |
---|---|
.NET | net5.0 net5.0-windows net6.0 net6.0-android net6.0-ios net6.0-maccatalyst net6.0-macos net6.0-tvos net6.0-windows |
.NET Core | netcoreapp2.1 netcoreapp2.2 netcoreapp3.0 netcoreapp3.1 |
Compatible target framework(s)
Additional computed target framework(s)
Learn more about Target Frameworks and .NET Standard.
-
.NETCoreApp 2.1
- Newtonsoft.Json (>= 12.0.2)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.