Sudo DIRelay Client
Interface encapsulating a library for interacting with the Sudo Platform Decentralized Identity Relay service.
Samples
import android.content.Context
import com.sudoplatform.sudodirelay.BaseTests
import com.sudoplatform.sudodirelay.SudoDIRelayClient
import com.sudoplatform.sudodirelay.subscription.MessageSubscriber
import com.sudoplatform.sudodirelay.subscription.Subscriber
import com.sudoplatform.sudodirelay.types.Message
import org.junit.Test
import org.junit.runner.RunWith
import org.mockito.kotlin.mock
import org.robolectric.RobolectricTestRunner
fun main() {
//sampleStart
val relayClient = SudoDIRelayClient.builder()
.setContext(context)
.build()
//sampleEnd
}
Functions
Request deletion of messages with IDs messageIds.
Initializes a relay postbox with the given connectionId.
Request deletion of the message with ID of messageId.
Request deletion of the relay postbox with ID of postboxId.
Gets a list of at most limit Messages for the current user.
Gets a list of postboxes for the current user.
Subscribes to notifications of incoming messages for the current user. Resubscribing with the same identifier will replace the existing subscription.
Subscribes to be notified of incoming messages.
Unsubscribe all subscribers from being notified about relay events.
Unsubscribe from relay events with the subscription identifier subscriberId so that the subscriber is no longer notified about incoming messages.
Request update of the relay postbox with ID of postboxId.