ProfileMethods

Methods related to getting and setting user profile data.

Source:

Methods

static Profile(
userAddressoptional,
userNameoptional
)
→ 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 Attributes Description
userAddress string <optional>

Address of the user

userName string <optional>

Username of the user

Source:

static ProfileMetadata({
typeoptional,
modeoptional,
appIdoptional,
userAddressoptional,
keyoptional
})
→ Promise.<(Object|String)>

Retrieve user profile metadata for the specified user

Returns: Returns the specified metadata
Parameters:
Name Type Attributes Default Description
type string <optional>
"app"

Specify app or user metadata.

mode string <optional>
"public"

Specify public or private metadata. If private is specified, you may only retrieve metadata for the current user.

appId string <optional>

Namespace to use for the metadata, if retrieving app metadata. Uses the app ID specified on client initialization by default.

userAddress string <optional>

User to retrieve metadata for. If not specified, will retrieve metadata for the current user

key string <optional>

The metadata key to retrieve

Source:

static RemoveProfileMetadata({
typeoptional,
modeoptional,
appIdoptional,
key
})

Remove user profile metadata for the current user

Parameters:
Name Type Attributes Default Description
type string <optional>
"app"

Specify app or user metadata.

mode string <optional>
"public"

Specify public or private metadata.

appId string <optional>

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

Source:

static SetProfileMetadata({
typeoptional,
modeoptional,
appIdoptional,
key,
value
})

Set user profile metadata for the current user

Parameters:
Name Type Attributes Default Description
type string <optional>
"app"

Specify app or user metadata.

mode string <optional>
"public"

Specify public or private metadata.

appId string <optional>

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

Source: