RocketChat/Rocket.Chat.Net

Name: Rocket.Chat.Net

Owner: Rocket.Chat

Description: A Rocket.Chat realtime managed .Net driver and bot

Forked from: Silvenga/Rocket.Chat.Net

Created: 2016-02-15 11:44:42.0

Updated: 2017-12-06 01:41:10.0

Pushed: 2016-10-29 16:30:54.0

Homepage: null

Size: 445

Language: C#

GitHub Committers

UserMost Recent Commit# Commits

Other Committers

UserEmailMost Recent Commit# Commits

README

Rocket.Chat.Net

Rocket.Chat.Net

| | Pre-release | Stable Release | | ——————- | ——————————————- | — | | Rocket.Chat.Net | NuGet | NuGet | | Rocket.Chat.Net.Bot | NuGet | NuGet |

Build status Build status Coverage Status License Rocket.Chat Compatibility

A Rocket.Chat real-time, managed, .Net driver, and bot.

Not compatible with 0.36.0, 0.37.0, 0.37.1, see https://github.com/Silvenga/Rocket.Chat.Net/issues/2 Waiting for things to settle down.

Driver Usage
t string username = "m@silvenga.com";
t string password = "silverlight";
t string rocketServerUrl = "demo.rocket.chat:3000";
t bool useSsl = false;

inOption loginOption = new LdapLoginOption

Username = username,
Password = password


ketChatDriver driver = new RocketChatDriver(rocketServerUrl, useSsl);

t driver.ConnectAsync(); // Connect to server
t driver.LoginAsync(loginOption); // Login via LDAP
t driver.SubscribeToRoomAsync(); // Listen on all rooms

er.MessageReceived += Console.WriteLine;

generalRoomIdResult = await driver.GetRoomIdAsync("general");
generalRoomIdResult.HasError)

throw new Exception("Could not find room by name.");


generalRoomId = generalRoomIdResult.Result;
t driver.SendMessageAsync("message", generalRoomId);
Bot Usage
t string username = "m@silvenga.com";
t string password = "silverlight";
t string rocketServerUrl = "dev0:3000"; // just the host and port
t bool useSsl = false; // Basically use ws or wss.

reate the bot - an abstraction of the driver
etChatBot bot = new RocketChatBot(rocketServerUrl, useSsl);

onnect to Rocket.Chat
t bot.ConnectAsync();

ogin
inOption loginOption = new EmailLoginOption

Email = username,
Password = password

t bot.LoginAsync(loginOption);

tart listening for messages
t bot.SubscribeAsync();

dd possible responses to be checked in order
his is not thead safe, FYI 
Response giphyResponse = new GiphyResponse();
AddResponse(giphyResponse);

nd that's it
heckout GiphyResponse in the example project for more info.
Building/Testing

docs/environment.md

Version compatibility changelogs

version-compatibility.md

Feature Support/TODO

docs/todo.md


This work is supported by the National Institutes of Health's National Center for Advancing Translational Sciences, Grant Number U24TR002306. This work is solely the responsibility of the creators and does not necessarily represent the official views of the National Institutes of Health.