C# Class Rocket.Chat.Net.Driver.RocketChatDriver

Inheritance: IRocketChatDriver
Mostra file Open project: RocketChat/Rocket.Chat.Net Class Usage Examples

Private Properties

Property Type Description
ClientOnDataReceivedRaw void
CreateTimeoutToken System.Threading.CancellationToken
GetRoomInfoCollection TypedStreamCollection
GetRooms IEnumerable
GetRoomsCollection TypedStreamCollection
HandleRocketMessage void
HandleStreamingCollections void
InternalLoginAsync Task>
OnDdpReconnect void
OnMessageReceived void
SetDriverUserInfoAsync Task
SetJsonOptions void

Public Methods

Method Description
ChannelListAsync ( ) : Task>
ConnectAsync ( ) : Task
CreateChannelAsync ( string roomName, IList members = null ) : Task>
CreateGroupAsync ( string groupName, IList members = null ) : Task>
CreatePrivateMessageAsync ( string username ) : Task>
DeleteMessageAsync ( string messageId, string roomId ) : Task
Dispose ( ) : void
EraseRoomAsync ( string roomId ) : Task>
GetCollection ( string collectionName ) : IStreamCollection
GetFullUserDataAsync ( string username ) : Task
GetNewTokenAsync ( ) : Task>
GetRoomIdAsync ( string roomIdOrName ) : Task>
GetStatisticsAsync ( bool refresh = false ) : Task>
HideRoomAsync ( string roomId ) : Task>
JoinRoomAsync ( string roomId ) : Task
LoadMessagesAsync ( string roomId, System.DateTime end = null, int limit = 20, string ls = null ) : Task>
LoginAsync ( ILoginOption loginOption ) : Task>
LoginResumeAsync ( string sessionToken ) : Task>
LoginWithEmailAsync ( string email, string password ) : Task>
LoginWithLdapAsync ( string username, string password ) : Task>
LoginWithUsernameAsync ( string username, string password ) : Task>
PinMessageAsync ( RocketMessage message ) : Task>
PingAsync ( ) : Task
RegisterUserAsync ( string name, string emailOrUsername, string password ) : Task
RemoveOtherTokensAsync ( ) : Task
ResetAvatarAsync ( ) : Task
RocketChatDriver ( ILogger logger, IDdpClient client, IStreamCollectionDatabase collectionDatabaseDatabase, bool isBot = true, JsonSerializerSettings jsonSerializerSettings = null ) : System
RocketChatDriver ( string url, bool useSsl, ILogger logger = null, bool isBot = true, JsonSerializerSettings jsonSerializerSettings = null ) : System
SearchMessagesAsync ( string query, string roomId, int limit = 100 ) : Task>
SendCustomMessageAsync ( Attachment attachment, string roomId ) : Task>
SendMessageAsync ( string text, string roomId ) : Task>
SetAvatarFromImageStreamAsync ( Stream sourceStream, string mimeType ) : Task
SetAvatarFromUrlAsync ( string url ) : Task
SetReactionAsync ( string reaction, string messageId ) : Task
SubscribeToAsync ( string streamName ) : Task
SubscribeToFilteredUsersAsync ( string username = "" ) : Task
SubscribeToRoomAsync ( string roomId = null ) : Task
SubscribeToRoomInformationAsync ( string roomName, RoomType type ) : Task
SubscribeToRoomListAsync ( ) : Task
UnpinMessageAsync ( RocketMessage message ) : Task
UpdateMessageAsync ( string messageId, string roomId, string newMessage ) : Task
UploadFileAsync ( string roomId ) : Task>

Private Methods

Method Description
ClientOnDataReceivedRaw ( string type, Newtonsoft.Json.Linq.JObject data ) : void
CreateTimeoutToken ( ) : CancellationToken
GetRoomInfoCollection ( ) : TypedStreamCollection
GetRooms ( ) : IEnumerable
GetRoomsCollection ( ) : TypedStreamCollection
HandleRocketMessage ( string type, Newtonsoft.Json.Linq.JObject data ) : void
HandleStreamingCollections ( string type, Newtonsoft.Json.Linq.JObject data ) : void
InternalLoginAsync ( object request ) : Task>
OnDdpReconnect ( ) : void
OnMessageReceived ( RocketMessage rocketmessage ) : void
SetDriverUserInfoAsync ( string userId ) : Task
SetJsonOptions ( JsonSerializerSettings jsonSerializerSettings = null ) : void

Method Details

ChannelListAsync() public method

public ChannelListAsync ( ) : Task>
return Task>

ConnectAsync() public method

public ConnectAsync ( ) : Task
return Task

CreateChannelAsync() public method

public CreateChannelAsync ( string roomName, IList members = null ) : Task>
roomName string
members IList
return Task>

CreateGroupAsync() public method

public CreateGroupAsync ( string groupName, IList members = null ) : Task>
groupName string
members IList
return Task>

CreatePrivateMessageAsync() public method

public CreatePrivateMessageAsync ( string username ) : Task>
username string
return Task>

DeleteMessageAsync() public method

public DeleteMessageAsync ( string messageId, string roomId ) : Task
messageId string
roomId string
return Task

Dispose() public method

public Dispose ( ) : void
return void

EraseRoomAsync() public method

public EraseRoomAsync ( string roomId ) : Task>
roomId string
return Task>

GetCollection() public method

public GetCollection ( string collectionName ) : IStreamCollection
collectionName string
return IStreamCollection

GetFullUserDataAsync() public method

public GetFullUserDataAsync ( string username ) : Task
username string
return Task

GetNewTokenAsync() public method

public GetNewTokenAsync ( ) : Task>
return Task>

GetRoomIdAsync() public method

public GetRoomIdAsync ( string roomIdOrName ) : Task>
roomIdOrName string
return Task>

GetStatisticsAsync() public method

public GetStatisticsAsync ( bool refresh = false ) : Task>
refresh bool
return Task>

HideRoomAsync() public method

public HideRoomAsync ( string roomId ) : Task>
roomId string
return Task>

JoinRoomAsync() public method

public JoinRoomAsync ( string roomId ) : Task
roomId string
return Task

LoadMessagesAsync() public method

public LoadMessagesAsync ( string roomId, System.DateTime end = null, int limit = 20, string ls = null ) : Task>
roomId string
end System.DateTime
limit int
ls string
return Task>

LoginAsync() public method

public LoginAsync ( ILoginOption loginOption ) : Task>
loginOption ILoginOption
return Task>

LoginResumeAsync() public method

public LoginResumeAsync ( string sessionToken ) : Task>
sessionToken string
return Task>

LoginWithEmailAsync() public method

public LoginWithEmailAsync ( string email, string password ) : Task>
email string
password string
return Task>

LoginWithLdapAsync() public method

public LoginWithLdapAsync ( string username, string password ) : Task>
username string
password string
return Task>

LoginWithUsernameAsync() public method

public LoginWithUsernameAsync ( string username, string password ) : Task>
username string
password string
return Task>

PinMessageAsync() public method

public PinMessageAsync ( RocketMessage message ) : Task>
message RocketMessage
return Task>

PingAsync() public method

public PingAsync ( ) : Task
return Task

RegisterUserAsync() public method

public RegisterUserAsync ( string name, string emailOrUsername, string password ) : Task
name string
emailOrUsername string
password string
return Task

RemoveOtherTokensAsync() public method

public RemoveOtherTokensAsync ( ) : Task
return Task

ResetAvatarAsync() public method

public ResetAvatarAsync ( ) : Task
return Task

RocketChatDriver() public method

public RocketChatDriver ( ILogger logger, IDdpClient client, IStreamCollectionDatabase collectionDatabaseDatabase, bool isBot = true, JsonSerializerSettings jsonSerializerSettings = null ) : System
logger ILogger
client IDdpClient
collectionDatabaseDatabase IStreamCollectionDatabase
isBot bool
jsonSerializerSettings Newtonsoft.Json.JsonSerializerSettings
return System

RocketChatDriver() public method

public RocketChatDriver ( string url, bool useSsl, ILogger logger = null, bool isBot = true, JsonSerializerSettings jsonSerializerSettings = null ) : System
url string
useSsl bool
logger ILogger
isBot bool
jsonSerializerSettings Newtonsoft.Json.JsonSerializerSettings
return System

SearchMessagesAsync() public method

public SearchMessagesAsync ( string query, string roomId, int limit = 100 ) : Task>
query string
roomId string
limit int
return Task>

SendCustomMessageAsync() public method

public SendCustomMessageAsync ( Attachment attachment, string roomId ) : Task>
attachment Rocket.Chat.Net.Models.Attachment
roomId string
return Task>

SendMessageAsync() public method

public SendMessageAsync ( string text, string roomId ) : Task>
text string
roomId string
return Task>

SetAvatarFromImageStreamAsync() public method

public SetAvatarFromImageStreamAsync ( Stream sourceStream, string mimeType ) : Task
sourceStream Stream
mimeType string
return Task

SetAvatarFromUrlAsync() public method

public SetAvatarFromUrlAsync ( string url ) : Task
url string
return Task

SetReactionAsync() public method

public SetReactionAsync ( string reaction, string messageId ) : Task
reaction string
messageId string
return Task

SubscribeToAsync() public method

public SubscribeToAsync ( string streamName ) : Task
streamName string
return Task

SubscribeToFilteredUsersAsync() public method

public SubscribeToFilteredUsersAsync ( string username = "" ) : Task
username string
return Task

SubscribeToRoomAsync() public method

public SubscribeToRoomAsync ( string roomId = null ) : Task
roomId string
return Task

SubscribeToRoomInformationAsync() public method

public SubscribeToRoomInformationAsync ( string roomName, RoomType type ) : Task
roomName string
type RoomType
return Task

SubscribeToRoomListAsync() public method

public SubscribeToRoomListAsync ( ) : Task
return Task

UnpinMessageAsync() public method

public UnpinMessageAsync ( RocketMessage message ) : Task
message RocketMessage
return Task

UpdateMessageAsync() public method

public UpdateMessageAsync ( string messageId, string roomId, string newMessage ) : Task
messageId string
roomId string
newMessage string
return Task

UploadFileAsync() public method

public UploadFileAsync ( string roomId ) : Task>
roomId string
return Task>