|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object winterwell.jtwitter.Twitter.User
public static final class Twitter.User
A Twitter user. Fields are null if unset.
Field Summary | |
---|---|
java.util.Date |
createdAt
|
java.lang.String |
description
|
int |
favoritesCount
|
int |
followersCount
|
boolean |
followRequestSent
True if the user you are authenticating as has requested to follow this user. |
int |
friendsCount
The number of people this user is following. |
java.lang.Long |
id
|
int |
listedCount
The number of public lists a user is listed in. |
java.lang.String |
location
The location, as reported by the user. |
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
The user's current status - *if* returned by Twitter. |
int |
statusesCount
|
java.lang.String |
timezone
|
double |
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. Warning: can be zero if Twitter did not supply the info (e.g. |
int |
getFollowersCount()
|
int |
getFriendsCount()
|
java.lang.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()
The user's current status - *if* returned by Twitter. |
int |
getStatusesCount()
|
java.lang.String |
getTimezone()
String version of the timezone |
double |
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 |
isFollowedByYou()
Are you following this person? |
boolean |
isFollowingYou()
Is this person following you? |
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. |
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final java.lang.String description
public final java.lang.Long id
public final java.lang.String location
Twitter.latLongLocn
.
public final java.lang.String name
public java.net.URI profileImageUrl
Note: we allow this to be edited as a convenience for the User objects generated by search
public final boolean protectedUser
public final java.lang.String screenName
Twitter.CASE_SENSITIVE_SCREENNAMES
public final Twitter.Status status
public final java.net.URI website
public final double timezoneOffSet
public final java.lang.String timezone
public int followersCount
public final java.lang.String profileBackgroundColor
public final java.lang.String profileLinkColor
public final java.lang.String profileTextColor
public final java.lang.String profileSidebarFillColor
public final java.lang.String profileSidebarBorderColor
public final int friendsCount
"following count" would be a better name, but historically Twitter calls this "friends count".
public final java.util.Date createdAt
public final int favoritesCount
public final java.net.URI profileBackgroundImageUrl
public final boolean profileBackgroundTile
public final int statusesCount
public final boolean notifications
public final boolean verified
public final boolean followRequestSent
public final int listedCount
Constructor Detail |
---|
public Twitter.User(java.lang.String screenName)
// Test whether jtwit is a friend
twitter.getFriends().contains(new User("jtwit"));
screenName
- This will be converted to lower-case as Twitter
screen-names are case insensitive (unless Twitter.CASE_SENSITIVE_SCREENNAMES
is set)Method Detail |
---|
public boolean equals(java.lang.Object other)
equals
in class java.lang.Object
public java.util.Date getCreatedAt()
public java.lang.String getDescription()
public int getFavoritesCount()
public int getFollowersCount()
public int getFriendsCount()
public java.lang.Long getId()
Note: this may switch to BigInteger in the future, if Twitter change their id numbering scheme. Use Number (which is a super-class for both Long and BigInteger) if you wish to future-proof your code.
public java.lang.String getLocation()
location
public java.lang.String getName()
getScreenName()
public java.lang.String getProfileBackgroundColor()
public java.net.URI getProfileBackgroundImageUrl()
public java.net.URI getProfileImageUrl()
public java.lang.String getProfileLinkColor()
public java.lang.String getProfileSidebarBorderColor()
public java.lang.String getProfileSidebarFillColor()
public java.lang.String getProfileTextColor()
public boolean getProtectedUser()
public java.lang.String getScreenName()
public Twitter.Status getStatus()
public int getStatusesCount()
public java.lang.String getTimezone()
public double getTimezoneOffSet()
public java.net.URI getWebsite()
public int hashCode()
hashCode
in class java.lang.Object
public boolean isDummyObject()
profileImageUrl
. Dummy User
objects are equals() to full User objects.public boolean isFollowingYou()
public boolean isFollowedByYou()
public boolean isNotifications()
public boolean isProfileBackgroundTile()
public boolean isProtectedUser()
public boolean isVerified()
public java.lang.String toString()
toString
in class java.lang.Object
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |