User - daneden/Twift GitHub Wiki

User

The user object contains Twitter user account metadata describing the referenced user.

public struct User: Codable, Identifiable 

Inheritance

Codable, Expandable, Fielded, Identifiable

Nested Type Aliases

ID

public typealias ID = String

Field

Additional fields that can be requested for User objects

public typealias Field = PartialKeyPath<User>

Properties

id

The unique identifier of this user.

public let id: ID

name

The name of the user, as they’ve defined it on their profile. Not necessarily a person’s name. Typically capped at 50 characters, but subject to change.

public let name: String

username

The Twitter screen name, handle, or alias that this user identifies themselves with. Usernames are unique but subject to change. Typically a maximum of 15 characters long, but some historical accounts may exist with longer names.

public let username: String

createdAt

The UTC datetime that the user account was created on Twitter.

public let createdAt: Date?

protected

Indicates if this user has chosen to protect their Tweets (in other words, if this user's Tweets are private).

public let protected: Bool?

withheld

Contains withholding details for withheld content, if applicable.

public let withheld: WithheldInformation?

location

The location specified in the user's profile, if the user provided one. As this is a freeform value, it may not indicate a valid location, but it may be fuzzily evaluated when performing searches with location queries.

public let location: String?

pinnedTweetId

Unique identifier of this user's pinned Tweet.

public let pinnedTweetId: Tweet.ID?

url

The URL specified in the user's profile, if present.

public let url: String?

description

The text of this user's profile description (also known as bio), if the user provided one.

public let description: String?

verified

Indicates if this user is a verified Twitter User.

public let verified: Bool?

entities

Contains details about text that has a special meaning in the user's description.

public let entities: Entities?

profileImageUrl

The URL to the profile image for this user, as shown on the user's profile.

public let profileImageUrl: URL?

profileImageUrlLarger

A URL to larger version of the user's profile image

public var profileImageUrlLarger: URL? 

profileImageUrlOriginal

A URL to the original, unmodified version of the user's profile image. This image may be very large.

public var profileImageUrlOriginal: URL? 

publicMetrics

Contains details about activity for this user.

public let publicMetrics: UserProfileMetrics?
⚠️ **GitHub.com Fallback** ⚠️