Attributes
public struct Attributes : Codable
A root object that stores information about a single user, such as the user’s username, bio, and profile image.
-
The role of the user.
Declaration
Swift
public let role: Int?
-
The slug of the user.
Declaration
Swift
public let slug: String
-
The username of the user.
Declaration
Swift
public let username: String
-
The Kurozora ID (email address) of the user.
Included only for the currently signed in user.
Declaration
Swift
public let email: String?
-
Whether the user has Sign in with Apple enabled.
Included only for the currently signed in user.
Declaration
Swift
public let siwaIsEnabled: Bool?
-
The biography text of the user.
Declaration
Swift
public var biography: String?
-
The biography HTML text of the user.
Declaration
Swift
public var biographyHTML: String?
-
The biography Markdown text of the user.
Declaration
Swift
public var biographyMarkdown: String?
-
The activity status of the user.
Declaration
Swift
public let activityStatus: ActivityStatus
-
The profile image of the user.
Declaration
Swift
public var profile: Media?
-
The banner image of the user.
Declaration
Swift
public var banner: Media?
-
Whether the user has a valid pro account.
Declaration
Swift
public var isPro: Bool
-
Whether the user has a valid subscription.
Declaration
Swift
public var isSubscribed: Bool
-
Whether the user is verified.
Declaration
Swift
public var isVerified: Bool
-
The join date of the user.
Declaration
Swift
public let joinDate: Date
-
The follower count of the user.
Declaration
Swift
public var followerCount: Int
-
The following count of the user.
Declaration
Swift
public var followingCount: Int
-
The reputation count of the user.
Declaration
Swift
public let reputationCount: Int
-
The user’s preferred language.
Declaration
Swift
public let preferredLanguage: String?
-
The user’s preferred TV rating.
Declaration
Swift
public let preferredTVRating: Int?
-
Whether the user can change their username.
Declaration
Swift
public let canChangeUsername: Bool?
-
The follow status of the user.
Declaration
Swift
public var followStatus: FollowStatus { get set }
-
Updates the attributes with the given
FollowUpdate
object.Declaration
Swift
public mutating func update(using followUpdate: FollowUpdate)
Parameters
followUpdate
The
FollowUpdate
object used to update the attributes. -
Returns a copy of the object with the updated attributes from the given
FollowUpdate
object.Declaration
Swift
public mutating func updated(using followUpdate: FollowUpdate) -> User.Attributes
Parameters
followUpdate
The
FollowUpdate
object used to update the attributes.Return Value
a copy of the object with the updated attributes from the given
followUpdate
object. -
Updates the attributes with the given
UserUpdate
object.Declaration
Swift
public mutating func update(using userUpdate: UserUpdate)
Parameters
userUpdate
The
UserUpdate
object used to update the attributes. -
Returns a copy of the object with the updated attributes from the given
UserUpdate
object.Declaration
Swift
public mutating func updated(using userUpdate: UserUpdate) -> User.Attributes
Parameters
userUpdate
The
UserUpdate
object used to update the attributes.Return Value
a copy of the object with the updated attributes from the given
userUpdate
object.