InboxApi
Static Methods
Create
Creates an instance of the InboxApi.
Params
connection
Connection
Instance of Connection
threadApi
ThreadApi
Instance of ThreadApi
storeApi
StoreApi
Instance of StoreApi
Returns
InboxApi
·
Created instance of the InboxApi.
Methods
CreateInbox
Creates a new Inbox.
Params
contextId
string
ID of the Context of the new Inbox.
users
List<UserWithPubKey>
Vector of UserWithPubKey structs which indicates who will have access to the created Inbox.
managers
List<UserWithPubKey>
Vector of UserWithPubKey structs which indicates who will have access (and management rights) to the created Inbox.
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.
filesConfig
FilesConfig?
(optional) Configuration of files.
policies
ContainerPolicyWithoutItem?
(optional) Inbox policy.
Returns
string
·
ID of the created Inbox.
UpdateInbox
Updates an existing Inbox.
Params
inboxId
string
ID of the Inbox to update.
users
List<UserWithPubKey>
Vector of UserWithPubKey structs which indicates who will have access to the created Inbox.
managers
List<UserWithPubKey>
Vector of UserWithPubKey structs which indicates who will have access (and management rights) to the created Inbox.
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.
filesConfig
FilesConfig?
(optional) Configuration of files.
version
long
Current version of the updated Inbox.
force
bool
Force update without checking version.
forceGenerateNewKey
bool
Force to regenerate a key for the Inbox.
policies
ContainerPolicyWithoutItem?
(optional) Inbox policy.
GetInbox
Gets a Inbox by given Inbox ID.
Params
inboxId
string
ID of the Inbox to get.
Returns
Models.Inbox
·
Information about about the Inbox.
ListInboxes
Gets s list of Inboxes in given Context.
Params
contextId
string
ID of the Context to get Inboxes from.
pagingQuery
PagingQuery
List query parameters.
Returns
PagingList<Models.Inbox>
·
List of Inboxes.
GetInboxPublicView
Gets public data of an Inbox. You do not have to be logged in to call this function.
Params
inboxId
string
ID of the Inbox to get.
Returns
InboxPublicView
·
Public accessible information about the Inbox.
DeleteInbox
Deletes an Inbox by given Inbox ID.
Params
inboxId
string
ID of the Inbox to delete.
PrepareEntry
Prepares a request to send data to an Inbox.
You do not have to be logged in to call this function.
Params
inboxId
string
ID of the Inbox to which the request applies.
data
byte[]
Entry data to send.
inboxFileHandles
List<long>
List of file handles that will be sent with the request.
userPrivKey
string?
(optional) Sender's private key which can be used later to encrypt data for that sender.
Returns
long
·
Inbox handle.
SendEntry
Sends data to an Inbox.
You do not have to be logged in to call this function.
Params
inboxHandle
long
ID of the Inbox to which the request applies.
ReadEntry
Gets an entry from an Inbox.
Params
inboxEntryId
string
ID of an entry to read from the Inbox.
Returns
InboxEntry
·
Data of the entry stored in the Inbox.
ListEntries
Gets list of entries in given Inbox.
Params
inboxId
string
ID of the Inbox.
pagingQuery
PagingQuery
List query parameters.
Returns
PagingList<InboxEntry>
·
List of entries.
DeleteEntry
Delete an entry from an Inbox.
Params
inboxEntryId
string
ID of an entry to delete.
CreateFileHandle
Creates a file handle to send a file to an Inbox.
Params
publicMeta
byte[]
Public file metadata.
privateMeta
byte[]
Private file metadata.
fileSize
long
Size of the file to send.
Returns
long
·
File handle.
WriteToFile
Sends a file's data chunk to an Inbox.
To send the entire file - divide it into pieces of the desired size and call the function for each fragment.
You do not have to be logged in to call this function.
Params
inboxHandle
long
ID of the Inbox to which the request applies.
inboxFileHandle
long
Handle to the file which the uploaded chunk belongs.
dataChunk
byte[]
File chunk to send.
OpenFile
Opens a file to read.
Params
fileId
string
ID of the file to read.
Returns
long
·
Handle to read file data.
ReadFromFile
Reads file data.
Params
fileHandle
long
Handle to the open file.
length
long
Size of data chunk to read.
Returns
byte[]
·
File data chunk which size is equal to length, or smaller size when is end of file.
SeekInFile
Moves file's read cursor.
Params
fileHandle
long
Handle to the file.
position
long
New position of the cursor.
CloseFile
Closes a file by given handle.
Params
fileHandle
long
Handle to the file.
Returns
string
·
ID of closed file.
SubscribeForInboxEvents
Subscribes for the Inbox module main events.
UnsubscribeFromInboxEvents
Unsubscribes from the Inbox module main events.
SubscribeForEntryEvents
Subscribes for events in given Inbox.
Params
inboxId
string
ID of the Inbox.
UnsubscribeFromEntryEvents
Unsubscribes from events in given Inbox.
Params
inboxId
string
ID of the Inbox.
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.