User

data class User(id: String?, name: String?, username: String?)

The user object contains Twitter user account metadata describing the referenced user. The user object is the primary object returned in the users lookup endpoint. When requesting additional user fields on this endpoint, simply use the fields parameter user.fields. The user object can also be found as a child object and expanded in the Tweet object. The object is available for expansion with ?expansions=author_id or ?expansions=in_reply_to_user_id to get the condensed object with only default fields. Use the expansion with the field parameter: user.fields when requesting additional fields to complete the object.

Constructors

Link copied to clipboard
fun User(id: String? = null, name: String? = null, username: String? = null)

Types

Link copied to clipboard
data class Entities(url: User.Entities.Url?, description: User.Entities.Description?)
Link copied to clipboard
data class PublicMetrics(followersCount: Long, followingCount: Long, tweetCount: Long, listedCount: Long)
Link copied to clipboard
data class Withheld(copyright: Boolean)

Properties

Link copied to clipboard
@SerializedName(value = "created_at")
var createdAt: String? = null

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

Link copied to clipboard
@SerializedName(value = "description")
var description: String? = null

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

Link copied to clipboard
@SerializedName(value = "entities")
var entities: User.Entities? = null

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

Link copied to clipboard
@SerializedName(value = "id")
var id: String? = null

The unique identifier of this user.

Link copied to clipboard
@SerializedName(value = "location")
var location: String? = null

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.

Link copied to clipboard
@SerializedName(value = "name")
var name: String? = null

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.

Link copied to clipboard
@SerializedName(value = "pinned_tweet_id")
var pinnedTweetId: String? = null

Unique identifier of this user's pinned Tweet.

Link copied to clipboard
@SerializedName(value = "profile_image_url")
var profileImageUrl: String? = null

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

Link copied to clipboard
@SerializedName(value = "protected")
var protected: Boolean = false

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

Link copied to clipboard
@SerializedName(value = "public_metrics")
var publicMetrics: User.PublicMetrics? = null

Contains details about activity for this user.

Link copied to clipboard
@SerializedName(value = "url")
var url: String? = null

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

Link copied to clipboard
@SerializedName(value = "username")
var username: String? = null

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.

Link copied to clipboard
@SerializedName(value = "verified")
var verified: Boolean = false

Indicates if this user is a verified Twitter User.

Link copied to clipboard
@SerializedName(value = "withheld")
var withheld: User.Withheld? = null

Contains withholding details for withheld content , if applicable.