Teams.ThirdPartyAppApi
0.8.16
See the version list below for details.
dotnet add package Teams.ThirdPartyAppApi --version 0.8.16
NuGet\Install-Package Teams.ThirdPartyAppApi -Version 0.8.16
<PackageReference Include="Teams.ThirdPartyAppApi" Version="0.8.16" />
paket add Teams.ThirdPartyAppApi --version 0.8.16
#r "nuget: Teams.ThirdPartyAppApi, 0.8.16"
// Install Teams.ThirdPartyAppApi as a Cake Addin
#addin nuget:?package=Teams.ThirdPartyAppApi&version=0.8.16
// Install Teams.ThirdPartyAppApi as a Cake Tool
#tool nuget:?package=Teams.ThirdPartyAppApi&version=0.8.16
Third-party app API Client
Use this Package to communicate with the Microsoft Teams Third-party app API
Clients
There are two clients available in this package:
TeamsClient
- for interacting with the legacy Teams appNewTeamsClient
- for interacting with the new Teams app
TeamsClient
This client is used to interact with the legacy Teams app. It is used to send and receive messages from the Teams app.
usage
//TeamsClient(string url, string token = "", bool autoReconnect = false, CancellationToken cancellationToken = default)
new TeamsClient("127.0.01", "token from app", true, cts)
NewTeamsClient
This client is used to interact with the new Teams app. It is used to send and receive messages from the Teams app. It only works localy until the Teams allows connections from another connection than localhost.
usage
//NewTeamsClient(string url, string manufacturer, string device, string app, string appVersion, bool autoReconnect = true, CancellationToken cancellationToken = default)
new NewTeamsClient("127.0.0.1", "companyName", "company device", "teams integgrator", "1.0", true, cts)
Reactive
This library uses Reactive dotnet https://github.com/dotnet/reactive. Every change in the client is pushed to the client as an observable. The client can then subscribe to the observable to get the changes.
Example
_teamsClient.IsConnectedChanged
.SubscribeAsync(async (connected) =>
{
if (connected)
{
await WhenConnected();
}
else
{
await WhenDisconnected();
}
});
Demo app
There is a demo app in the solution that shows how to use the clients. The demo app is a console app that connects to the Teams app and sends and receives messages.
Contribute
If you want to contribute to this project, please create a pull request. We will review the pull request and merge it if it is a good fit for the project.
Bugs and feature requests
If you find a bug or have a feature request, please create an issue in the issue tracker. We will review the issue and try to fix it as soon as possible.
Product | Versions 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. |
-
net8.0
- Macross.Json.Extensions (>= 3.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 8.0.0)
- System.Reactive (>= 6.0.0)
NuGet packages
This package is not used by any NuGet packages.
GitHub repositories
This package is not used by any popular GitHub repositories.