twitter4j
Class User

java.lang.Object
  extended by twitter4j.TwitterResponse
      extended by twitter4j.User
All Implemented Interfaces:
java.io.Serializable

public class User
extends TwitterResponse
implements java.io.Serializable

A data class representing Basic user information element

Author:
Yusuke Yamamoto - yusuke at mac.com
See Also:
REST API Documentation - Basic user information element, Serialized Form

Method Summary
static java.util.List<User> constructUsers(Response res, Twitter twitter)
           
 boolean equals(java.lang.Object obj)
           
 java.util.Date getCreatedAt()
           
 java.lang.String getDescription()
          Returns the description of the user
 int getFavouritesCount()
           
 int getFollowersCount()
          Returns the number of followers
 int getFriendsCount()
           
 int getId()
          Returns the id of the user
 java.lang.String getLocation()
          Returns the location of the user
 java.lang.String getName()
          Returns the name of the user
 java.lang.String getProfileBackgroundColor()
           
 java.lang.String getProfileBackgroundImageUrl()
           
 java.lang.String getProfileBackgroundTile()
           
 java.net.URL getProfileImageURL()
          Returns the profile image url of the user
 java.lang.String getProfileLinkColor()
           
 java.lang.String getProfileSidebarBorderColor()
           
 java.lang.String getProfileSidebarFillColor()
           
 java.lang.String getProfileTextColor()
           
 java.lang.String getScreenName()
          Returns the screen name of the user
 java.util.Date getStatusCreatedAt()
           
 int getStatusesCount()
           
 long getStatusId()
           
 java.lang.String getStatusInReplyToScreenName()
           
 long getStatusInReplyToStatusId()
           
 int getStatusInReplyToUserId()
           
 java.lang.String getStatusSource()
           
 java.lang.String getStatusText()
           
 java.lang.String getTimeZone()
           
 java.net.URL getURL()
          Returns the url of the user
 int getUtcOffset()
           
 int hashCode()
           
 boolean isFollowing()
          Deprecated. Deprecation of following and notification elements
 boolean isGeoEnabled()
           
 boolean isNotificationEnabled()
          Deprecated. Deprecation of following and notification elements
 boolean isNotifications()
          Deprecated. use isNotificationsEnabled() instead
 boolean isProtected()
          Test if the user status is protected
 boolean isStatusFavorited()
           
 boolean isStatusTruncated()
           
 boolean isVerified()
           
 DirectMessage sendDirectMessage(java.lang.String text)
           
 java.lang.String toString()
           
 
Methods inherited from class twitter4j.TwitterResponse
ensureRootNodeNameIs, ensureRootNodeNameIs, ensureRootNodeNameIs, getBoolean, getChildBoolean, getChildDate, getChildDate, getChildInt, getChildLong, getChildText, getInt, getLong, getRateLimitLimit, getRateLimitRemaining, getRateLimitReset, getString, getTextContent, isRootNodeNilClasses, parseDate
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Method Detail

getId

public int getId()
Returns the id of the user

Returns:
the id of the user

getName

public java.lang.String getName()
Returns the name of the user

Returns:
the name of the user

getScreenName

public java.lang.String getScreenName()
Returns the screen name of the user

Returns:
the screen name of the user

getLocation

public java.lang.String getLocation()
Returns the location of the user

Returns:
the location of the user

getDescription

public java.lang.String getDescription()
Returns the description of the user

Returns:
the description of the user

getProfileImageURL

public java.net.URL getProfileImageURL()
Returns the profile image url of the user

Returns:
the profile image url of the user

getURL

public java.net.URL getURL()
Returns the url of the user

Returns:
the url of the user

isProtected

public boolean isProtected()
Test if the user status is protected

Returns:
true if the user status is protected

getFollowersCount

public int getFollowersCount()
Returns the number of followers

Returns:
the number of followers
Since:
Twitter4J 1.0.4

sendDirectMessage

public DirectMessage sendDirectMessage(java.lang.String text)
                                throws TwitterException
Throws:
TwitterException

constructUsers

public static java.util.List<User> constructUsers(Response res,
                                                  Twitter twitter)
                                           throws TwitterException
Throws:
TwitterException

getStatusCreatedAt

public java.util.Date getStatusCreatedAt()
Returns:
created_at or null if the user is protected
Since:
Twitter4J 1.1.0

getStatusId

public long getStatusId()
Returns:
status id or -1 if the user is protected

getStatusText

public java.lang.String getStatusText()
Returns:
status text or null if the user is protected

getStatusSource

public java.lang.String getStatusSource()
Returns:
source or null if the user is protected
Since:
1.1.4

isStatusTruncated

public boolean isStatusTruncated()
Returns:
truncated or false if the user is protected
Since:
1.1.4

getStatusInReplyToStatusId

public long getStatusInReplyToStatusId()
Returns:
in_reply_to_status_id or -1 if the user is protected
Since:
1.1.4

getStatusInReplyToUserId

public int getStatusInReplyToUserId()
Returns:
in_reply_to_user_id or -1 if the user is protected
Since:
1.1.4

isStatusFavorited

public boolean isStatusFavorited()
Returns:
favorited or false if the user is protected
Since:
1.1.4

getStatusInReplyToScreenName

public java.lang.String getStatusInReplyToScreenName()
Returns:
in_reply_to_screen_name or null if the user is protected
Since:
1.1.4

getProfileBackgroundColor

public java.lang.String getProfileBackgroundColor()

getProfileTextColor

public java.lang.String getProfileTextColor()

getProfileLinkColor

public java.lang.String getProfileLinkColor()

getProfileSidebarFillColor

public java.lang.String getProfileSidebarFillColor()

getProfileSidebarBorderColor

public java.lang.String getProfileSidebarBorderColor()

getFriendsCount

public int getFriendsCount()

getCreatedAt

public java.util.Date getCreatedAt()

getFavouritesCount

public int getFavouritesCount()

getUtcOffset

public int getUtcOffset()

getTimeZone

public java.lang.String getTimeZone()

getProfileBackgroundImageUrl

public java.lang.String getProfileBackgroundImageUrl()

getProfileBackgroundTile

public java.lang.String getProfileBackgroundTile()

isFollowing

public boolean isFollowing()
Deprecated. Deprecation of following and notification elements


isNotifications

public boolean isNotifications()
Deprecated. use isNotificationsEnabled() instead


isNotificationEnabled

public boolean isNotificationEnabled()
Deprecated. Deprecation of following and notification elements

Since:
Twitter4J 2.0.1

getStatusesCount

public int getStatusesCount()

isGeoEnabled

public boolean isGeoEnabled()
Returns:
the user is enabling geo location
Since:
Twitter4J 2.0.10

isVerified

public boolean isVerified()
Returns:
returns true if the user is a verified celebrity
Since:
Twitter4J 2.0.10

hashCode

public int hashCode()
Overrides:
hashCode in class java.lang.Object

equals

public boolean equals(java.lang.Object obj)
Overrides:
equals in class java.lang.Object

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2009. All Rights Reserved.