Account

public class Account : Codable, Identifiable, @unchecked Sendable
extension Account: Hashable
extension Account: CustomDebugStringConvertible

Represents a user and their associated profile.

  • Undocumented

    Declaration

    Swift

    public init(id: String, username: String? = nil, acct: String, url: String, displayName: String? = nil, note: String, avatar: String, avatarStatic: String? = nil, header: String, headerStatic: String, locked: Bool, emojis: [Emoji], discoverable: Bool? = nil, createdAt: Date, lastPostAt: Date? = nil, postsCount: Int, followersCount: Int, followingCount: Int, moved: Account? = nil, suspended: Bool? = nil, limited: Bool? = nil, fields: [TootField], bot: Bool? = nil, source: TootSource? = nil)
  • id

    The account id.

    Declaration

    Swift

    public let id: String
  • The username of the account, not including domain.

    Declaration

    Swift

    public let username: String?
  • The Webfinger account URI. Equal to username for local users, or username@domain for remote users.

    Declaration

    Swift

    public let acct: String
  • url

    The location of the user’s profile page

    Declaration

    Swift

    public let url: String
  • The profile’s display name.

    Declaration

    Swift

    public let displayName: String?
  • The profile’s bio / description

    Declaration

    Swift

    public let note: String
  • An image icon that is shown next to posts and in the profile

    Declaration

    Swift

    public let avatar: String
  • A static version of the avatar.

    Declaration

    Swift

    public let avatarStatic: String?
  • An image banner that is shown above the profile and in profile cards

    Declaration

    Swift

    public let header: String
  • A static version of the header

    Declaration

    Swift

    public let headerStatic: String
  • Whether the account manually approves follow requests

    Declaration

    Swift

    public let locked: Bool
  • Custom emoji entities to be used when rendering the profile. If none, an empty array will be returned

    Declaration

    Swift

    public let emojis: [Emoji]
  • Whether the account has opted into discovery features such as the profile directory

    Declaration

    Swift

    public let discoverable: Bool?
  • When the account was created

    Declaration

    Swift

    public let createdAt: Date
  • When the most recent post was posted

    Declaration

    Swift

    public let lastPostAt: Date?
  • How many posts are attached to this account

    Declaration

    Swift

    public let postsCount: Int
  • The reported followers of this profile

    Declaration

    Swift

    public let followersCount: Int
  • The reported follows of this profile

    Declaration

    Swift

    public let followingCount: Int
  • Indicates that the profile is currently inactive and that its user has moved to a new account

    Declaration

    Swift

    public let moved: Account?
  • An extra attribute returned only when an account is suspended.

    Declaration

    Swift

    public let suspended: Bool?
  • An extra attribute returned only when an account is silenced. If true, indicates that the account should be hidden behing a warning screen.

    Declaration

    Swift

    public let limited: Bool?
  • Additional metadata attached to a profile as name-value pairs

    Declaration

    Swift

    public let fields: [TootField]
  • bot

    A presentational flag. Indicates that the account may perform automated actions, may not be monitored, or identifies as a robot

    Declaration

    Swift

    public let bot: Bool?
  • An extra entity to be used with API methods to verify credentials and update credentials

    Declaration

    Swift

    public let source: TootSource?
  • Undocumented

    See more

    Declaration

    Swift

    enum CodingKeys : String, CodingKey
  • Declaration

    Swift

    public func hash(into hasher: inout Hasher)
  • Declaration

    Swift

    public static func == (lhs: Account, rhs: Account) -> Bool
  • Declaration

    Swift

    public var debugDescription: String { get }