AsyncInboxApi
Inbox API wrapper that provides asynchronous methods and manages resources.
Methods
AsyncInboxApi
Wraps existing connection into async connection. It's user responsibility to provide valid (connected) connection.
Params
connection
Connection
Connection to wrap
AsyncInboxApi
Wraps existing inbox api. It's recommended to use this constructor in tests or custom scenarios.
Params
inboxApi
IInboxApi
Wrapped inbox api
connectionId
long
Connection ID
eventDispatcher
IEventDispatcher
Event dispatcher used in event streams
DisposeAsync
Disposes async inbox api with all related resources.
Returns
ValueTask
·
CreateInboxAsync
Creates a new Inbox.contextIdID of the Context of the new Inbox.usersVector of UserWithPubKey structs which indicates who will have access to the created Inbox.managersVector of UserWithPubKey structs which indicates who will have access (and management rights) to the created Inbox. publicMetaPublic (unencrypted) metadata.privateMetaPrivate (encrypted) metadata.filesConfigOptional configuration of files.policies(optional) Inbox policy.tokenCancellation token.ID of the created Inbox.
Params
contextId
string
users
List<UserWithPubKey>
managers
List<UserWithPubKey>
publicMeta
byte[]
privateMeta
byte[]
filesConfig
FilesConfig
policies
ContainerPolicyWithoutItem?
token
CancellationToken
Returns
ValueTask<string>
·
UpdateInboxAsync
Updates an existing Inbox.inboxIdID of the Inbox to update.usersVector of UserWithPubKey structs which indicates who will have access to the created Inbox.managersVector of UserWithPubKey structs which indicates who will have access (and management rights) to the created Inbox. publicMetaPublic (unencrypted) metadata.privateMetaPrivate (encrypted) metadata.filesConfigOptional configuration of files.versionCurrent version of the updated Inbox.forceForce update without checking version.forceGenerateNewKeyForce to regenerate a key for the Inbox.policies(optional) Inbox policy.tokenCancellation token.
Params
inboxId
string
users
List<UserWithPubKey>
managers
List<UserWithPubKey>
publicMeta
byte[]
privateMeta
byte[]
filesConfig
FilesConfig
version
long
force
bool
forceGenerateNewKey
bool
policies
ContainerPolicyWithoutItem?
token
CancellationToken
Returns
ValueTask
·
GetInboxAsync
Gets a Inbox by given Inbox ID.inboxIdID of the Inbox to get.tokenCancellation token.Information about about the Inbox.
Params
inboxId
string
token
CancellationToken
Returns
ValueTask<PrivMX.Endpoint.Inbox.Models.Inbox>
·
ListInboxesAsync
Gets s list of Inboxes in given Context.contextIdID of the Context to get Inboxes from.pagingQueryList query parameters.tokenCancellation token.List of Inboxes.
Params
contextId
string
pagingQuery
PagingQuery
token
CancellationToken
Returns
ValueTask<PagingList<PrivMX.Endpoint.Inbox.Models.Inbox>>
·
GetInboxPublicViewAsync
Gets public data of an Inbox. You do not have to be logged in to call this function.inboxIdID of the Inbox to get.tokenCancellation token.Public accessible information about the Inbox.
Params
inboxId
string
token
CancellationToken
Returns
ValueTask<InboxPublicView>
·
DeleteInboxAsync
Deletes an Inbox by given Inbox ID.inboxIdID of the Inbox to delete.tokenCancellation token
Params
inboxId
string
token
CancellationToken
Returns
ValueTask
·
GetEntryBuilder
Returns entry builder that can be used to create new entries in the inbox.inboxIdID of inbox where entry will be created.Inbox entry builder.
Params
inboxId
string
Returns
InboxEntryWriterBuilder
·
ReadEntryAsync
Gets an entry from an Inbox.inboxEntryIdID of an entry to read from the Inbox.tokenCancellation token.Data of the entry stored in the Inbox.
Params
inboxEntryId
string
token
CancellationToken
Returns
ValueTask<InboxEntry>
·
ListEntriesAsync
Gets list of entries in given Inbox.inboxIdID of the Inbox.pagingQueryList query parameters.tokenCancellation token.List of entries.
Params
inboxId
string
pagingQuery
PagingQuery
token
CancellationToken
Returns
ValueTask<PagingList<InboxEntry>>
·
DeleteEntryAsync
Delete an entry from an Inbox.inboxEntryIdID of an entry to delete.tokenCancellation token.
Params
inboxEntryId
string
token
CancellationToken
Returns
ValueTask
·
OpenFileForRead
Opens file for user to read.entryEntry from which file will be opended.fileIdID of file to open.tokenCancellation token.Fixed size seekable and readable stream.
Params
entry
InboxEntry
fileId
string
token
CancellationToken
Returns
async ValueTask<PrivmxFileStream>
·
GetInboxEvents
Get inbox events.Stream of inbox events.
Returns
IObservable<InboxEvent>
·
GetEntryEvents
Get events related to specific inbox entries.inboxIdID of the inbox.Stream of entries events.
Params
inboxId
string
Returns
IObservable<InboxEntryEvent>
·
Dispose
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.