Struct egg_mode::user::TwitterUser [] [src]

pub struct TwitterUser {
    pub contributors_enabled: bool,
    pub created_at: DateTime<Utc>,
    pub default_profile: bool,
    pub default_profile_image: bool,
    pub description: Option<String>,
    pub entities: UserEntities,
    pub favourites_count: i32,
    pub follow_request_sent: Option<bool>,
    pub followers_count: i32,
    pub friends_count: i32,
    pub geo_enabled: bool,
    pub id: u64,
    pub is_translator: bool,
    pub lang: String,
    pub listed_count: i32,
    pub location: Option<String>,
    pub name: String,
    pub profile_background_color: String,
    pub profile_background_image_url: Option<String>,
    pub profile_background_image_url_https: Option<String>,
    pub profile_background_tile: Option<bool>,
    pub profile_banner_url: Option<String>,
    pub profile_image_url: String,
    pub profile_image_url_https: String,
    pub profile_link_color: String,
    pub profile_sidebar_border_color: String,
    pub profile_sidebar_fill_color: String,
    pub profile_text_color: String,
    pub profile_use_background_image: bool,
    pub protected: bool,
    pub screen_name: String,
    pub show_all_inline_media: Option<bool>,
    pub status: Option<Box<Tweet>>,
    pub statuses_count: i32,
    pub time_zone: Option<String>,
    pub url: Option<String>,
    pub utc_offset: Option<i32>,
    pub verified: bool,
    pub withheld_in_countries: Option<Vec<String>>,
    pub withheld_scope: Option<String>,
    // some fields omitted
}

Represents a Twitter user.

Field-level documentation is mostly ripped wholesale from Twitter's user documentation.

The fields present in this struct can be divided up into a few sections: Profile Information and Settings.

Profile Information

Information here can be considered part of the user's profile. These fields are the "obvious" visible portion of a profile view.

  • id
  • screen_name
  • name
  • verified
  • protected
  • description
  • location
  • url
  • statuses_count
  • friends_count
  • followers_count
  • favourites_count
  • listed_count
  • profile_image_url/profile_image_url_https
  • profile_banner_url

Settings Information

Information here can be used to alter the UI around this user, or to provide further metadata that may not necessarily be user-facing.

  • contributors_enabled
  • created_at
  • default_profile_image
  • follow_request_sent
  • default_profile, profile_background_color, profile_background_image_url, profile_background_image_url_https, profile_background_tile, profile_link_color, profile_sidebar_border_color, profile_sidebar_fill_color, profile_text_color, profile_use_background_image: These fields can be used to theme a user's profile page to look like the settings they've set on the Twitter website.
  • geo_enabled
  • is_translator
  • lang
  • show_all_inline_media
  • time_zone/utc_offset
  • withheld_in_countries/withheld_scope

Fields

Indicates this user has an account with "contributor mode" enabled, allowing for Tweets issued by the user to be co-authored by another account. Rarely true.

The UTC timestamp for when this user account was created on Twitter.

When true, indicates that this user has not altered the theme or background of their user profile.

When true, indicates that the user has not uploaded their own avatar and a default egg avatar is used instead.

The user-defined string describing their account.

Link information that has been parsed out of the url or description fields given by the user.

The number of tweets this user has favorited or liked in the account's lifetime. The term "favourites" and its British spelling are used for historical reasons.

When true, indicates that the authenticating user has issued a follow request to this protected account.

The number of followers this account has.

In certain server-stress conditions, this may temporarily mistakenly return 0.

The number of users this account follows, aka its "followings".

In certain server-stress conditions, this may temporarily mistakenly return 0.

Indicates whether this user as enabled their tweets to be geotagged.

If this is set for the current user, then they can attach geographic data when posting a new Tweet.

Unique identifier for this user.

Indicates whether the user participates in Twitter's translator community.

Language code for the user's self-declared interface language.

Codes are formatted as a language tag from BCP 47. Only indicates the user's interface language, not necessarily the content of their Tweets.

The number of public lists the user is a member of.

The user-entered location field from their profile. Not necessarily parseable or even a location.

The user-entered display name.

The hex color chosen by the user for their profile background.

A URL pointing to the background image chosen by the user for their profile. Uses HTTP as the protocol.

A URL pointing to the background image chosen by the user for their profile. Uses HTTPS as the protocol.

Indicates whether the user's profile_background_image_url should be tiled when displayed.

A URL pointing to the banner image chosen by the user. Uses HTTPS as the protocol.

This is a base URL that a size specifier can be appended onto to get variously sized images, with size specifiers according to Profile Images and Banners.

A URL pointing to the user's avatar image. Uses HTTP as the protocol. Size specifiers can be used according to Profile Images and Banners.

A URL pointing to the user's avatar image. Uses HTTPS as the protocol. Size specifiers can be used according to Profile Images and Banners.

The hex color chosen by the user to display links in the Twitter UI.

The hex color chosen by the user to display sidebar borders in the Twitter UI.

The hex color chosen by the user to display sidebar backgrounds in the Twitter UI.

The hex color chosen by the user to display text in the Twitter UI.

Indicates whether the user wants their uploaded background image to be used.

Indicates whether the user is a protected account.

The screen name or handle identifying this user.

Screen names are unique per-user but can be changed. Use id for an immutable identifier for an account.

Typically a maximum of 15 characters long, but older accounts may exist with longer screen names.

Indicates that the user would like to see media inline. "Somewhat disused."

If possible, the most recent tweet or retweet from this user.

"In some circumstances, this data cannot be provided and this field will be omitted, null, or empty." Do not depend on this field being filled. Also note that this is actually their most-recent tweet, not the status pinned to their profile.

"Perspectival" items within this tweet that depend on the authenticating user may not be completely reliable in this embed.

The number of tweets (including retweets) posted by this user.

The full name of the time zone the user has set their UI preference to.

The website link given by this user in their profile.

The UTC offset of time_zone in minutes.

Indicates whether this user is a verified account.

When present, lists the countries this user has been withheld from.

When present, indicates whether the content being withheld is a "status" or "user".

Trait Implementations

impl Debug for TwitterUser
[src]

[src]

Formats the value using the given formatter.

impl Clone for TwitterUser
[src]

[src]

Returns a copy of the value. Read more

1.0.0
[src]

Performs copy-assignment from source. Read more