Profile Methods
Methods related to getting and setting user profile data.
Profile
userAddress, // optional
userName // optional
) → Promise.<Object>
Retrieve profile info for the specified user, including address, username, profile image (if set) and badges (if any)
Returns: Profile info of the specified user
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
userAddress | string | Address of the user | |
userName | string | Username of the user |
ProfileMetadata
type, // optional
mode, // optional
appId, // optional
userAddress, // optional
key // optional
}) → Promise.<(Object|String)>
Retrieve user profile metadata for the specified user
Returns: Returns the specified metadata
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Specify "app") | |
mode | string | Specify "public") | |
appId | string | Namespace to use for the metadata, if retrieving app metadata. Uses the app ID specified on client initialization by default. | |
userAddress | string | User to retrieve metadata for. If not specified, will retrieve metadata for the current user | |
key | string | The metadata key to retrieve |
RemoveProfileMetadata
type, // optional
mode, // optional
appId, // optional
key
})
Remove user profile metadata for the current user
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Specify "app") | |
mode | string | Specify "public") | |
appId | string | Namespace to use for the metadata, if retrieving app metadata.. Uses the app ID specified on client initialization by default. | |
key | string | ✓ | The metadata key to set |
SetProfileMetadata
type, // optional
mode, // optional
appId, // optional
key,
value
})
Set user profile metadata for the current user
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
type | string | Specify "app") | |
mode | string | Specify "public") | |
appId | string | Namespace to use for the metadata, if retrieving app metadata. Uses the app ID specified on client initialization by default. | |
key | string | ✓ | The metadata key to set |
value | string | ✓ | The metadata value to set |