ThreadApi
Static Methods
Create
Creates an instance of the ThreadApi.
Params
connection
Connection
Instance of Connection
Returns
ThreadApi
·
Created instance of the ThreadApi.
Methods
CreateThread
Creates new Thread in given Context.
Params
contextId
string
ID of the Context to create the Thread in.
users
List<UserWithPubKey>
Array of UserWithPubKey which indicates who will have access to the created Thread.
managers
List<UserWithPubKey>
Array of UserWithPubKey which indicates who will have access (and management rights) to the created Thread.
publicMeta
byte[]
Public metadata that will remain unencrypted on the Bridge.
privateMeta
byte[]
Private metadata that will be encrypted before being sent to the Bridge.
policies
ContainerPolicy?
(optional) Thread policy.
Returns
string
·
ID of the created Thread.
UpdateThread
Updates an existing Thread.
Params
threadId
string
ID of the Thread to update.
users
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access to the created Thread.
managers
List<UserWithPubKey>
Array of UserWithPubKey structs which indicates who will have access (and management rights) to the created Thread.
publicMeta
byte[]
Public metadata that will remain unencrypted on the Bridge.
privateMeta
byte[]
Private metadata that will be encrypted before being sent to the Bridge.
version
long
Current version of the updated Thread.
force
bool
Force update (without checking version).
forceGenerateNewKey
bool
Force to regenerate a key for the Thread.
policies
ContainerPolicy?
(optional) Thread policy.
DeleteThread
Deletes a Thread by given Thread ID.
Params
threadId
string
ID of the Thread to delete.
GetThread
Gets a Thread by given Thread ID.
Params
threadId
string
ID of Thread to get.
Returns
Models.Thread
·
Information about about the Thread.
ListThreads
Gets a list of Threads in given Context.
Params
contextId
string
ID of the Context to get the Threads from.
pagingQuery
PagingQuery
List query parameters.
Returns
PagingList<Models.Thread>
·
List of Threads.
GetMessage
Gets a message by given message ID.
Params
messageId
string
ID of the message to get.
Returns
Message
·
Message.
ListMessages
Gets a list of messages from a Thread.
Params
threadId
string
ID of the Thread to list messages from.
pagingQuery
PagingQuery
List query parameters.
Returns
PagingList<Message>
·
List of messages.
SendMessage
Sends a message in a Thread.
Params
threadId
string
ID of the Thread to send message to.
publicMeta
byte[]
Public message metadata.
privateMeta
byte[]
Private message metadata.
data
byte[]
Content of the message.
Returns
string
·
ID of the new message.
UpdateMessage
Updates a message in a Thread.
Params
messageId
string
ID of the message to update.
publicMeta
byte[]
Public message metadata.
privateMeta
byte[]
Private message metadata.
data
byte[]
Content of the message.
DeleteMessage
Deletes a message by given message ID.
Params
messageId
string
ID of the message to delete.
SubscribeForThreadEvents
Subscribes for the Thread module main events.
UnsubscribeFromThreadEvents
Unsubscribes from the Thread module main events.
SubscribeForMessageEvents
Subscribes for the events in given Thread.
Params
threadId
string
ID of the Thread to subscribe for.
UnsubscribeFromMessageEvents
Unsubscribes from events in given Thread.
Params
threadId
string
ID of the Thread to unsubscribe from.
We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.