|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object winterwell.jtwitter.Twitter.Status
public static final class Twitter.Status
A Twitter status post. .toString() returns the status text.
Notes: This is a finalised data object. It exposes its fields for
convenient access. If you want to change your status, use
Twitter.setStatus(String)
and
Twitter.destroyStatus(Status)
.
Field Summary | |
---|---|
java.util.Date |
createdAt
|
java.math.BigInteger |
id
Warning: use equals() not == to compare these! |
java.math.BigInteger |
inReplyToStatusId
Often null (even when this Status is a reply). |
int |
retweetCount
Represents the number of times a status has been retweeted using _new-style_ retweets. |
java.lang.String |
source
E.g. |
java.lang.String |
text
The actual status text. |
Twitter.User |
user
Rarely null. |
Constructor Summary | |
---|---|
Twitter.Status(Twitter.User user,
java.lang.String text,
java.lang.Number id,
java.util.Date createdAt)
Deprecated. |
Method Summary | |
---|---|
boolean |
equals(java.lang.Object obj)
Tests by class=Status and tweet id number |
java.util.Date |
getCreatedAt()
|
java.math.BigInteger |
getId()
Twitter IDs are numbers - but they can exceed the range of Java's signed long. |
java.lang.String |
getLocation()
|
java.util.List<java.lang.String> |
getMentions()
|
Twitter.Status |
getOriginal()
Only set for official new-style retweets. |
java.lang.String |
getText()
The actual status text. |
java.util.List<Twitter.TweetEntity> |
getTweetEntities(Twitter.KEntityType type)
Twitter are wrapping some urls with their own url-shortener (as a defence against malicious tweets). |
Twitter.User |
getUser()
The User who made the tweet |
int |
hashCode()
|
boolean |
isFavorite()
true if this has been marked as a favourite by the authenticating user |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
Field Detail |
---|
public final java.util.Date createdAt
public final java.math.BigInteger id
public final java.lang.String text
public final Twitter.User user
When can this be null?
- If creating a "fake" tweet via
Status#Status(User, String, long, Date)
and supplying a null
User!
public final java.lang.String source
"fake" if this Status was made locally or from an RSS feed rather than retrieved from Twitter json (as normal).
public final java.math.BigInteger inReplyToStatusId
public final int retweetCount
Constructor Detail |
---|
@Deprecated public Twitter.Status(Twitter.User user, java.lang.String text, java.lang.Number id, java.util.Date createdAt)
If you want to post a tweet (and hence get a real Status object), use
Twitter.setStatus(String)
.
user
- Can be null or bogus -- provided that's OK with your code.text
- Can be null or bogus -- provided that's OK with your code.id
- Can be null or bogus -- provided that's OK with your code.createdAt
- Can be null -- provided that's OK with your code.Method Detail |
---|
public int hashCode()
hashCode
in class java.lang.Object
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
public java.lang.String getLocation()
public Twitter.Status getOriginal()
public boolean isFavorite()
public java.util.Date getCreatedAt()
getCreatedAt
in interface Twitter.ITweet
public java.math.BigInteger getId()
Twitter.ITweet
getId
in interface Twitter.ITweet
public java.util.List<java.lang.String> getMentions()
public java.util.List<Twitter.TweetEntity> getTweetEntities(Twitter.KEntityType type)
Entity support is off by default. Request entity support by setting
Twitter.setIncludeTweetEntities(boolean)
.
Twitter do NOT support entities for search :(
type
- urls, user_mentions, or hashtags
public java.lang.String getText()
toString()
getText
in interface Twitter.ITweet
public Twitter.User getUser()
Twitter.ITweet
getUser
in interface Twitter.ITweet
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 |