VeeFriends.Restream.Chat
1.0.4
See the version list below for details.
dotnet add package VeeFriends.Restream.Chat --version 1.0.4
NuGet\Install-Package VeeFriends.Restream.Chat -Version 1.0.4
<PackageReference Include="VeeFriends.Restream.Chat" Version="1.0.4" />
paket add VeeFriends.Restream.Chat --version 1.0.4
#r "nuget: VeeFriends.Restream.Chat, 1.0.4"
// Install VeeFriends.Restream.Chat as a Cake Addin
#addin nuget:?package=VeeFriends.Restream.Chat&version=1.0.4
// Install VeeFriends.Restream.Chat as a Cake Tool
#tool nuget:?package=VeeFriends.Restream.Chat&version=1.0.4
VeeFriends.Restream.Chat
This package provides integration with Twilio and Restream for relaying chat messages.
Installation
$ dotnet add package VeeFriends.Restream.Chat
Usage
This library enables the handling and relaying of chat messages across different platforms, including Restream and Twilio.
- Configure the relay options with necessary credentials and settings.
- Create an instance of the
Relay
class. - Start listening to chat messages and handle them accordingly.
Configuration
Configure the relay options with the necessary credentials for Twilio and Restream.
var relayOptions = new RelayOptions
{
TwilioChatAccountSid = "your-account-sid",
TwilioChatAuthToken = "your-auth-token",
TwilioChatServiceId = "your-service-id",
RestreamChatEmbedId = "your-embed-id"
};
Creating the Relay
Create an instance of the Relay
class using the configured options.
var relay = new Relay(relayOptions);
Start Listening
Start listening to a specific conversation using one of the available methods:
Using a specific time to stop listening
var stopOn = DateTime.Now.AddMinutes(10);
relay.StartListening("conversation-id", stopOn, cancellationToken);
Using a time span to stop listening
var stopIn = TimeSpan.FromMinutes(10);
relay.StartListening("conversation-id", stopIn, cancellationToken);
Using a custom function to determine when to stop listening
relay.StartListening("conversation-id", async () =>
{
// Your custom logic here
return await Task.FromResult(false);
}, cancellationToken);
Handling Messages
You can extend the functionality by implementing your logic for handling messages within the relay classes and methods.
Feel free to explore the code and tailor it to your specific needs.
Product | Versions Compatible and additional computed target framework versions. |
---|---|
.NET | net7.0 is compatible. 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. |
-
net7.0
- Microsoft.Extensions.Configuration.Abstractions (>= 7.0.0)
- Microsoft.Extensions.DependencyInjection.Abstractions (>= 7.0.0)
- Microsoft.Extensions.Logging.Abstractions (>= 7.0.1)
- Twilio (>= 6.10.1)
- Websocket.Client (>= 4.6.1)
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.1.3 | 2,499 | 4/17/2024 |
1.1.2 | 8,812 | 1/23/2024 |
1.1.1 | 72 | 1/23/2024 |
1.0.34 | 6,413 | 9/6/2023 |
1.0.33 | 117 | 9/6/2023 |
1.0.32 | 120 | 9/6/2023 |
1.0.31 | 4,392 | 9/6/2023 |
1.0.30 | 114 | 9/6/2023 |
1.0.29 | 106 | 9/6/2023 |
1.0.28 | 101 | 9/6/2023 |
1.0.27 | 95 | 9/6/2023 |
1.0.26 | 124 | 9/6/2023 |
1.0.25 | 91 | 9/6/2023 |
1.0.24 | 110 | 9/6/2023 |
1.0.23 | 129 | 9/6/2023 |
1.0.22 | 799 | 8/22/2023 |
1.0.21 | 119 | 8/22/2023 |
1.0.20 | 126 | 8/22/2023 |
1.0.19 | 124 | 8/22/2023 |
1.0.18 | 112 | 8/22/2023 |
1.0.17 | 138 | 8/21/2023 |
1.0.16 | 106 | 8/21/2023 |
1.0.15 | 141 | 8/21/2023 |
1.0.14 | 117 | 8/21/2023 |
1.0.13 | 124 | 8/21/2023 |
1.0.12 | 120 | 8/21/2023 |
1.0.11 | 119 | 8/21/2023 |
1.0.10 | 219 | 8/18/2023 |
1.0.9 | 464 | 8/10/2023 |
1.0.8 | 148 | 8/10/2023 |
1.0.7 | 108 | 8/10/2023 |
1.0.6 | 160 | 8/10/2023 |
1.0.5 | 128 | 8/10/2023 |
1.0.4 | 139 | 8/10/2023 |
1.0.3 | 154 | 8/10/2023 |