User

ProfileService API

Get the ProfileService object via a login session.

val profileService = session.profileService()

Set user nickname

Updates the user's display name.

suspend fun setDisplayName(userId: String, newDisplayName: String)

Input parameters:

Name
Type
Description
Required

userId

String

User ID

true

newDisplayName

String

New display name

true

Set user avatar

Updates the user's profile picture.

suspend fun updateAvatar(userId: String, newAvatarUri: Uri, fileName: String)

Input parameter:

Name
Type
Description
Required

userId

String

User ID

true

newAvatarUri

String

New avatar uri

true

fileName

String

Name of selected image file

true

Set user profile description

Sets a self-introduction for the user's profile.

suspend fun setProfileBio(userId: String, bio: String)

Input parameter:

Name
Type
Description
Required

userId

string

User ID

true

bio

string

Profile description

true

Output parameter: None

Retrieve user profile

Get a user's profile data

suspend fun getProfile(userId: String): JsonDict

Input parameter:

Name
Type
Description
Required

userId

string

User ID

true

Output parameter:

Type
Description
Required

JsonDict

User profile key-value data

true

JsonDict fields:

Name
Type
Description
Required

displayname

string

User nickname

true

avatar_url

string

User profile image

true

bio

string

User profile self-introduction

true

wallet_address

string

User wallet address

true


AccountDataService API

Get the AccountDataService object through a login session

val accountDataService = session.accountDataService()

Set user account data

Sets custom data related to the user. content contains the complete data for the specified type.

suspend fun updateUserAccountData(type: String, content: Content)

Input parameter:

Name
Type
Description
Required

type

string

Customized data type

true

content

Content

Content in key-value pairs

true

Output parameter: None

Retrieve user account data

fun getUserAccountDataEvent(type: String): UserAccountDataEvent?

Input parameter:

Name
Type
Description
Required

type

string

Type of data you wish to query

true

Output parameter: UserAccountDataEvent

Name
Type
Description
Required

type

string

Data type

true

content

Content

Key/value pairs

true


UserService API

Get the UserService object via a login session.

val userService = session.userService()

Get the contact list

Retrieve the list of your contacts.

suspend fun getContacts(): List<ContactInfo>

Input parameters: None

Output parameter:

Type
Description
Required

List

List of contact's information

true

ContactInfo details:

Name
Type
Description
Required

contactId

String

Contact ID

true

displayName

String

Contact name

false

avatarUrl

String

URL to the contact's avatar image

false

walletAddress

String

Contact's wallet address

false

tags

String array

Array of tags associated with the contact

false

Add a contact

Add a user to your contact list.

suspend fun addContact(contactId: String, tags: List<String> = listOf())

Input parameters:

Name
Type
Description
Required

contactId

String

Contact ID

true

tags

String array

Array of tags associated with the contact

false

Output parameter: None

Delete a contact

Remove a user from your contact list.

suspend fun removeContact(contactId: String)

Input parameters:

Name
Type
Description
Required

contactId

String

Contact ID

true

Output parameter: None

Last updated