DXProfile

Struct representing a DX profile.

A user's DX profile is represented by a DXProfile instance. DXProfile conforms to Equatable, allowing you to test if two users are the same.

Properties

public let userId: String

An id that is unique for each DX profile.

public let userType: UserType

A profile's user type is determined by the user's age.

public let accountType: AccountType

A profile's account type is determined when that account is created. When creating sandbox users in the developer dashboard, you can set their account type as either Parent, Adult, or Child.

public let handle: String

The user's handle.

public var firstName: String?

The user's first name. Some account types, such as a Character account, will not have a first name, in which case firstName will be nil.

public var lastName: String?

The user's last name. Some account types, such as a Character account, will not have a last name, in which case lastName will be nil.

public var profilePic: String?

A string representing the id of a user's profile pic. A user is not required to have a profile pic, in which case profilePic will be nil.

public var coverPhoto: String?

A string representing the id of a user's cover photo. A user is not required to have a cover photo, in which case coverPhoto will be nil.

public let country: String

The country code representing where the profile was created.

public let anonymous: Bool

Indicates whether or not this user was created anonymously.

Internal Types

UserType

public enum UserType: String, Codable

An enum representing the possible user types a profile can have. User type is determined be a user's age, e.g., a user whose age is 18+ will have a userType of adult.

case adult
case child
case teenMinor

AccountType

public enum AccountType: String, Codable

An enum representing the possible account types a profile can have. Account type is determined when a user account is created, e.g., when a parent creates an account, they will have an accountType of parent.

case parent
case kid
case adult
case character
case community

Last updated