MessagingApi
public protocol MessagingApi : BaseApi
Undocumented
-
getAll(byIds:)
Default implementationGet all messages by ids.
Default Implementation
Declaration
Swift
func getAll(byIds ids: [ObjectIdConvertible]) -> Single<[Message]>
Parameters
ids
Filter by message ids, as
[MessagingObjectId]
or[String]
format.Return Value
[Message]
. -
get(byId:)
Default implementationGet message by id.
Default Implementation
Declaration
Swift
func get(byId id: ObjectIdConvertible) -> Single<Message>
Parameters
id
Filter by message id, as
MessagingObjectId
orString
format.Return Value
-
getAllDecrypted(byIds:credentials:)
Default implementationGet all messages by ids decrypted.
Default Implementation
Declaration
Swift
func getAllDecrypted(byIds ids: [ObjectIdConvertible], credentials: Credentials) -> Single<[Message]>
Parameters
ids
Filter by message ids, as
[MessagingObjectId]
or[String]
format.credentials
Account credenials, as
ChainObject
orString
format.Return Value
[Message]
. -
getDecrypted(byId:credentials:)
Default implementationGet message by id decrypted.
Default Implementation
Declaration
Swift
func getDecrypted(byId id: ObjectIdConvertible, credentials: Credentials) -> Single<Message>
Parameters
id
Filter by message id, as
MessagingObjectId
orString
format.credentials
Account credenials, as
ChainObject
orString
format.Return Value
-
findAll(bySender:limit:)
Default implementationFind all messages by sender.
Default Implementation
Declaration
Swift
func findAll(bySender sender: AccountObjectIdConvertible, limit: Int) -> Single<[Message]>
Parameters
sender
Filter by sender account id, as
AccountObjectId
orString
format.limit
Max items to return.
Return Value
[Message]
. -
findAll(byReceiver:limit:)
Default implementationFind all messages by receiver.
Default Implementation
Declaration
Swift
func findAll(byReceiver receiver: AccountObjectIdConvertible, limit: Int) -> Single<[Message]>
Parameters
receiver
Filter by receiver account id, as
AccountObjectId
orString
format.limit
Max items to return.
Return Value
[Message]
. -
findAllSenderDecrypted(_:limit:)
Default implementationFind all messages decrypted by sender.
Default Implementation
Declaration
Swift
func findAllSenderDecrypted(_ credentials: Credentials, limit: Int) -> Single<[Message]>
Parameters
credentials
Account credenials, as
ChainObject
orString
format.limit
Max items to return.
Return Value
[Message]
. -
findAllReceiverDecrypted(_:limit:)
Default implementationFind all messages decrypted by receiver.
Default Implementation
Declaration
Swift
func findAllReceiverDecrypted(_ credentials: Credentials, limit: Int) -> Single<[Message]>
Parameters
credentials
Account credenials, as
ChainObject
orString
format.limit
Max items to return.
Return Value
[Message]
. -
findAllResponses(bySender:limit:)
Default implementationFind all messages responses.
Default Implementation
Declaration
Swift
func findAllResponses(bySender sender: AccountObjectIdConvertible, limit: Int) -> Single<[MessageResponse]>
Parameters
sender
Filter by sender account id, as
AccountObjectId
orString
format.limit
Max items to return.
Return Value
[MessageResponse]
. -
findAllResponses(byReceiver:limit:)
Default implementationFind all messages responses.
Default Implementation
Declaration
Swift
func findAllResponses(byReceiver receiver: AccountObjectIdConvertible, limit: Int) -> Single<[MessageResponse]>
Parameters
receiver
Filter by receiver account id, as
AccountObjectId
orString
format.limit
Max items to return.
Return Value
[MessageResponse]
. -
createMessage(to:message:credentials:)
Default implementationCreate message operation, send a message to one receiver.
Default Implementation
Declaration
Swift
func createMessage(to: AccountObjectIdConvertible, message: String, credentials: Credentials) -> Single<SendMessageOperation>
Parameters
to
receiver account id, as
AccountObjectId
orString
format.message
Message to send.
credentials
Sender account credentials.
Return Value
-
createMessage(_:credentials:)
Default implementationCreate message operation, send messages to multiple receivers.
Default Implementation
Declaration
Swift
func createMessage(_ payloads: [Pair<AccountObjectIdConvertible, String>], credentials: Credentials) -> Single<SendMessageOperation>
Parameters
payloads
Pairs of receiver account id, as
AccountObjectId
orString
format and message.credentials
Sender account credentials.
Return Value
-
send(to:message:credentials:)
Default implementationSend a message to one receiver.
Default Implementation
Declaration
Swift
func send(to: AccountObjectIdConvertible, message: String, credentials: Credentials) -> Single<TransactionConfirmation>
Parameters
to
receiver account id, as
AccountObjectId
orString
format.message
Message to send.
credentials
Sender account credentials.
Return Value
-
createUnencryptedMessage(to:message:credentials:)
Default implementationCreate unencrypted message operation, send a message to one receiver.
Default Implementation
Declaration
Swift
func createUnencryptedMessage(to: AccountObjectIdConvertible, message: String, credentials: Credentials) -> Single<SendMessageOperation>
Parameters
to
receiver account id, as
AccountObjectId
orString
format.message
Message to send.
credentials
Sender account credentials.
Return Value
-
createUnencryptedMessage(_:credentials:)
Default implementationCreate unencrypted message operation, send messages to multiple receivers.
Default Implementation
Declaration
Swift
func createUnencryptedMessage(_ payloads: [Pair<AccountObjectIdConvertible, String>], credentials: Credentials) -> Single<SendMessageOperation>
Parameters
payloads
Pairs of receiver account id, as
AccountObjectId
orString
format and message.credentials
Sender account credentials.
Return Value
-
sendUnencrypted(to:message:credentials:)
Default implementationSend unencrypted message to one receiver.
Default Implementation
Declaration
Swift
func sendUnencrypted(to: AccountObjectIdConvertible, message: String, credentials: Credentials) -> Single<TransactionConfirmation>
Parameters
to
receiver account id, as
AccountObjectId
orString
format.message
Message to send.
credentials
Sender account credentials.
Return Value