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

pub struct TwitterUser {
    pub contributors_enabled: bool,
    pub created_at: String,
    pub default_profile: bool,
    pub default_profile_image: bool,
    pub description: Option<String>,
    pub favourites_count: i32,
    pub follow_request_sent: Option<bool>,
    pub followers_count: i32,
    pub friends_count: i32,
    pub geo_enabled: bool,
    pub id: i64,
    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 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

contributors_enabled: bool

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.

created_at: String

The UTC datetime that this user account was created on Twitter, formatted like "Tue Jan 13 23:37:34 +0000 2015".

default_profile: bool

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

default_profile_image: bool

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

description: Option<String>

The user-defined string describing their account.

favourites_count: i32

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.

follow_request_sent: Option<bool>

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

followers_count: i32

The number of followers this account has.

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

friends_count: i32

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

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

geo_enabled: bool

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.

id: i64

Unique identifier for this user.

is_translator: bool

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

lang: String

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.

listed_count: i32

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

location: Option<String>

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

name: String

The user-entered display name.

profile_background_color: String

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

profile_background_image_url: Option<String>

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

profile_background_image_url_https: Option<String>

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

profile_background_tile: Option<bool>

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

profile_banner_url: Option<String>

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.

profile_image_url: String

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.

profile_image_url_https: String

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.

profile_link_color: String

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

profile_sidebar_border_color: String

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

profile_sidebar_fill_color: String

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

profile_text_color: String

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

profile_use_background_image: bool

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

protected: bool

Indicates whether the user is a protected account.

screen_name: String

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.

show_all_inline_media: Option<bool>

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

statuses_count: i32

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

time_zone: Option<String>

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

url: Option<String>

The website link given by this user in their profile.

utc_offset: Option<i32>

The UTC offset of time_zone in minutes.

verified: bool

Indicates whether this user is a verified account.

withheld_in_countries: Option<Vec<String>>

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

withheld_scope: Option<String>

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

Trait Implementations

impl Debug for TwitterUser
[src]

fn fmt(&self, __arg_0: &mut Formatter) -> Result

Formats the value using the given formatter.