VeeFriends.Restream.Chat 1.0.29

There is a newer version of this package available.
See the version list below for details.
dotnet add package VeeFriends.Restream.Chat --version 1.0.29                
NuGet\Install-Package VeeFriends.Restream.Chat -Version 1.0.29                
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="VeeFriends.Restream.Chat" Version="1.0.29" />                
For projects that support PackageReference, copy this XML node into the project file to reference the package.
paket add VeeFriends.Restream.Chat --version 1.0.29                
#r "nuget: VeeFriends.Restream.Chat, 1.0.29"                
#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.
// Install VeeFriends.Restream.Chat as a Cake Addin
#addin nuget:?package=VeeFriends.Restream.Chat&version=1.0.29

// Install VeeFriends.Restream.Chat as a Cake Tool
#tool nuget:?package=VeeFriends.Restream.Chat&version=1.0.29                

VeeFriends.Restream.Chat

This package provides integration with Twilio and Restream for relaying chat messages.

Nuget

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.

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"
};

Integration with ASP.NET Core

You can easily add the Relay class to your ASP.NET Core project using the provided extension method:

public void ConfigureServices(IServiceCollection services)
{
    var relayOptions = new RelayOptions
    {
        // Set relay options here
        // ...
    };

    services.AddRestreamToTwiloRelay(relayOptions);

    // Other services
}

This extension method abstracts the process of registering the Relay class with the DI container, providing a convenient way to include the functionality in an ASP.NET Core application.

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 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. 
Compatible target framework(s)
Included target framework(s) (in package)
Learn more about Target Frameworks and .NET Standard.

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 25,933 4/17/2024
1.1.2 8,840 1/23/2024
1.1.1 100 1/23/2024
1.0.34 6,445 9/6/2023
1.0.33 147 9/6/2023
1.0.32 160 9/6/2023
1.0.31 4,422 9/6/2023
1.0.30 148 9/6/2023
1.0.29 135 9/6/2023
1.0.28 131 9/6/2023
1.0.27 115 9/6/2023
1.0.26 151 9/6/2023
1.0.25 119 9/6/2023
1.0.24 135 9/6/2023
1.0.23 159 9/6/2023
1.0.22 826 8/22/2023
1.0.21 147 8/22/2023
1.0.20 154 8/22/2023
1.0.19 149 8/22/2023
1.0.18 138 8/22/2023
1.0.17 162 8/21/2023
1.0.16 127 8/21/2023
1.0.15 163 8/21/2023
1.0.14 146 8/21/2023
1.0.13 148 8/21/2023
1.0.12 151 8/21/2023
1.0.11 143 8/21/2023
1.0.10 245 8/18/2023
1.0.9 489 8/10/2023
1.0.8 177 8/10/2023
1.0.7 136 8/10/2023
1.0.6 186 8/10/2023
1.0.5 154 8/10/2023
1.0.4 166 8/10/2023
1.0.3 179 8/10/2023