winterwell.jtwitter
Class Twitter.User

java.lang.Object
  extended by winterwell.jtwitter.Twitter.User
Enclosing class:
Twitter

public static final class Twitter.User
extends java.lang.Object

A Twitter user. Fields are null if unset.

Author:
daniel

Field Summary
 java.util.Date createdAt
           
 java.lang.String description
           
 int favoritesCount
           
 int followersCount
           
 boolean following
           
 int friendsCount
          number of people this user is following
 long id
           
 java.lang.String location
           
 java.lang.String name
          The display name, e.g.
 boolean notifications
           
 java.lang.String profileBackgroundColor
           
 java.net.URI profileBackgroundImageUrl
           
 boolean profileBackgroundTile
           
 java.net.URI profileImageUrl
          The url for the user's Twitter profile picture.
 java.lang.String profileLinkColor
           
 java.lang.String profileSidebarBorderColor
           
 java.lang.String profileSidebarFillColor
           
 java.lang.String profileTextColor
           
 boolean protectedUser
          true if this user keeps their updates private
 java.lang.String screenName
          The login name, e.g.
 Twitter.Status status
           
 int statusesCount
           
 java.lang.String timezone
           
 int timezoneOffSet
          Number of seconds between a user's registered time zone and Greenwich Mean Time (GMT) - aka Coordinated Universal Time or UTC.
 boolean verified
           
 java.net.URI website
           
 
Constructor Summary
Twitter.User(java.lang.String screenName)
          Create a dummy User object.
 
Method Summary
 boolean equals(java.lang.Object other)
           
 java.util.Date getCreatedAt()
           
 java.lang.String getDescription()
           
 int getFavoritesCount()
          number of statuses a user has marked as favorite
 int getFollowersCount()
           
 int getFriendsCount()
           
 long getId()
           
 java.lang.String getLocation()
           
 java.lang.String getName()
          The display name, e.g.
 java.lang.String getProfileBackgroundColor()
           
 java.net.URI getProfileBackgroundImageUrl()
           
 java.net.URI getProfileImageUrl()
           
 java.lang.String getProfileLinkColor()
           
 java.lang.String getProfileSidebarBorderColor()
           
 java.lang.String getProfileSidebarFillColor()
           
 java.lang.String getProfileTextColor()
           
 boolean getProtectedUser()
           
 java.lang.String getScreenName()
          The login name, e.g.
 Twitter.Status getStatus()
           
 int getStatusesCount()
           
 java.lang.String getTimezone()
          String version of the timezone
 int getTimezoneOffSet()
          Number of seconds between a user's registered time zone and Greenwich Mean Time (GMT) - aka Coordinated Universal Time or UTC.
 java.net.URI getWebsite()
           
 int hashCode()
           
 boolean isDummyObject()
           
 boolean isFollowing()
           
 boolean isNotifications()
           
 boolean isProfileBackgroundTile()
           
 boolean isProtectedUser()
          true if this user keeps their updates private
 boolean isVerified()
           
 java.lang.String toString()
          Returns the User's screenName (i.e. their Twitter login)
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

createdAt

public final java.util.Date createdAt

description

public final java.lang.String description

favoritesCount

public final int favoritesCount

followersCount

public int followersCount

following

public final boolean following

friendsCount

public final int friendsCount
number of people this user is following


id

public final long id

location

public final java.lang.String location

name

public final java.lang.String name
The display name, e.g. "Daniel Winterstein"


notifications

public final boolean notifications

profileBackgroundColor

public final java.lang.String profileBackgroundColor

profileBackgroundImageUrl

public final java.net.URI profileBackgroundImageUrl

profileBackgroundTile

public final boolean profileBackgroundTile

profileImageUrl

public java.net.URI profileImageUrl
The url for the user's Twitter profile picture.

Note: we allow this to be edited as a convenience for the User objects generated by search


profileLinkColor

public final java.lang.String profileLinkColor

profileSidebarBorderColor

public final java.lang.String profileSidebarBorderColor

profileSidebarFillColor

public final java.lang.String profileSidebarFillColor

profileTextColor

public final java.lang.String profileTextColor

protectedUser

public final boolean protectedUser
true if this user keeps their updates private


screenName

public final java.lang.String screenName
The login name, e.g. "winterstein" This is the only thing used by equals() and hashcode(). This is always lower-case, as Twitter screen-names are case insensitive.


status

public final Twitter.Status status

statusesCount

public final int statusesCount

timezone

public final java.lang.String timezone

timezoneOffSet

public final int timezoneOffSet
Number of seconds between a user's registered time zone and Greenwich Mean Time (GMT) - aka Coordinated Universal Time or UTC. Can be positive or negative.


verified

public final boolean verified

website

public final java.net.URI website
Constructor Detail

Twitter.User

public Twitter.User(java.lang.String screenName)
Create a dummy User object. All fields are set to null. This will be equals() to an actual User object, so it can be used to query collections. E.g.
 // Test whether jtwit is a friend
 twitter.getFriends().contains(new User("jtwit"));
 

Parameters:
screenName - This will be converted to lower-case as Twitter screen-names are case insensitive
Method Detail

equals

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

getCreatedAt

public java.util.Date getCreatedAt()

getDescription

public java.lang.String getDescription()

getFavoritesCount

public int getFavoritesCount()
number of statuses a user has marked as favorite


getFollowersCount

public int getFollowersCount()

getFriendsCount

public int getFriendsCount()
Returns:
number of people this user is following

getId

public long getId()

getLocation

public java.lang.String getLocation()

getName

public java.lang.String getName()
The display name, e.g. "Daniel Winterstein"

See Also:
getScreenName()

getProfileBackgroundColor

public java.lang.String getProfileBackgroundColor()

getProfileBackgroundImageUrl

public java.net.URI getProfileBackgroundImageUrl()

getProfileImageUrl

public java.net.URI getProfileImageUrl()

getProfileLinkColor

public java.lang.String getProfileLinkColor()

getProfileSidebarBorderColor

public java.lang.String getProfileSidebarBorderColor()

getProfileSidebarFillColor

public java.lang.String getProfileSidebarFillColor()

getProfileTextColor

public java.lang.String getProfileTextColor()

getProtectedUser

public boolean getProtectedUser()

getScreenName

public java.lang.String getScreenName()
The login name, e.g. "winterstein"


getStatus

public Twitter.Status getStatus()

getStatusesCount

public int getStatusesCount()

getTimezone

public java.lang.String getTimezone()
String version of the timezone


getTimezoneOffSet

public int getTimezoneOffSet()
Number of seconds between a user's registered time zone and Greenwich Mean Time (GMT) - aka Coordinated Universal Time or UTC. Can be positive or negative.


getWebsite

public java.net.URI getWebsite()

hashCode

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

isDummyObject

public boolean isDummyObject()
Returns:
true if this is a dummy User object, in which case almost all of it's fields will be null - with the exception of screenName and possibly profileImageUrl. Dummy User objects are equals() to full User objects.

isFollowing

public boolean isFollowing()

isNotifications

public boolean isNotifications()

isProfileBackgroundTile

public boolean isProfileBackgroundTile()

isProtectedUser

public boolean isProtectedUser()
true if this user keeps their updates private


isVerified

public boolean isVerified()
Returns:
true if the account has been verified by Twitter to really be who it claims to be.

toString

public java.lang.String toString()
Returns the User's screenName (i.e. their Twitter login)

Overrides:
toString in class java.lang.Object


Copyright © 2014 gvSIG Association. All Rights Reserved.