|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwinterwell.jtwitter.Status
public final class 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. |
User |
user
Rarely null. |
| Constructor Summary | |
|---|---|
Status(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.lang.String |
getDisplayText()
|
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()
|
Status |
getOriginal()
Only set for official new-style retweets. |
Place |
getPlace()
|
java.lang.String |
getText()
The actual status text. |
java.util.List<Twitter.TweetEntity> |
getTweetEntities(Twitter.KEntityType type)
Twitter wrap urls with their own url-shortener (as a defence against malicious tweets). |
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 |
boolean |
isSensitive()
A self-applied label for sensitive content (eg. |
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.math.BigInteger inReplyToStatusId
public final int retweetCount
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.lang.String text
public final User user
When can this be null?
- If creating a "fake" tweet via
Status#Status(User, String, long, Date) and supplying a null
User!
| Constructor Detail |
|---|
@Deprecated
public Status(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 boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.util.Date getCreatedAt()
getCreatedAt in interface Twitter.ITweetpublic java.math.BigInteger getId()
Twitter.ITweet
getId in interface Twitter.ITweetpublic java.lang.String getLocation()
getLocation in interface Twitter.ITweetNote: This will be set if Twitter supply any geo-information. We extract a location from geo and place objects.
public java.util.List<java.lang.String> getMentions()
getMentions in interface Twitter.ITweetTwitter.CASE_SENSITIVE_SCREENNAMES is switched on.public Status getOriginal()
public Place getPlace()
getPlace in interface Twitter.ITweetpublic java.lang.String getText()
toString().
NB: This can be longer than 140 chars for a retweet.
getText in interface Twitter.ITweetpublic java.util.List<Twitter.TweetEntity> getTweetEntities(Twitter.KEntityType type)
Twitter.ITweet
Entity support is off by default. Request entity support by setting
Twitter.setIncludeTweetEntities(boolean). Twitter do NOT
support entities for search :(
getTweetEntities in interface Twitter.ITweettype - urls, user_mentions, or hashtags
public User getUser()
Twitter.ITweet
getUser in interface Twitter.ITweetpublic int hashCode()
hashCode in class java.lang.Objectpublic boolean isFavorite()
public boolean isSensitive()
public java.lang.String toString()
toString in class java.lang.Objectpublic java.lang.String getDisplayText()
getDisplayText in interface Twitter.ITweet
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||