User
public struct User : IdentityResource, Hashable
A root object that stores information about a user resource.
-
Declaration
Swift
public let id: String
-
Declaration
Swift
public let type: String
-
Declaration
Swift
public let href: String
-
An object which holds information about the current user.
Declaration
Swift
public static var current: User?
-
The attributes belonging to the user.
Declaration
Swift
public var attributes: User.Attributes
-
The relationships blonging to yhe user.
Declaration
Swift
public let relationships: User.Relationships?
-
Declaration
Swift
public static func == (lhs: User, rhs: User) -> Bool
-
Declaration
Swift
public func hash(into hasher: inout Hasher)
-
Returns a boolean indicating if the current user is signed in.
Declaration
Swift
public static var isSignedIn: Bool { get }
-
Returns a boolean indicating if the current signed in user has a pro account.
Declaration
Swift
public static var isPro: Bool { get }
-
Returns a boolean indicating if the current signed in user has a Kurozra+ subscription.
Declaration
Swift
public static var isSubscribed: Bool { get }
-
Updates the user with the given details.
Declaration
Swift
internal mutating func updateDetails(with userDetails: User)
Parameters
userDetails
The details used to update the current user’s details.
-
A root object that stores information about a single user, such as the user’s username, bio, and profile image.
See moreDeclaration
Swift
public struct Attributes : Codable
-
A root object that stores information about user relationships, such as the sessions, and badges that belong to it.
See moreDeclaration
Swift
public struct Relationships : Codable