|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectwinterwell.jtwitter.Message
public final class Message
A Twitter direct message. Fields are null if unset. TODO are there more fields now? check the raw json
| Field Summary | |
|---|---|
java.lang.Number |
inReplyToMessageId
Equivalent to Status.inReplyToStatusId *but null by default*. |
java.lang.String |
text
|
| Method Summary | |
|---|---|
boolean |
equals(java.lang.Object obj)
Tests by class=Message and tweet id number |
java.util.Date |
getCreatedAt()
|
java.lang.String |
getDisplayText()
|
java.lang.Long |
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()
|
Place |
getPlace()
|
User |
getRecipient()
|
User |
getSender()
|
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()
This is equivalent to getSender() |
int |
hashCode()
|
java.lang.String |
toString()
|
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public java.lang.Number inReplyToMessageId
Status.inReplyToStatusId *but null by default*. If
you want to use this, you must set it yourself. The field is just a
convenient storage place. Strangely Twitter don't report the previous ID
for messages.
public final java.lang.String text
| Method Detail |
|---|
public java.lang.String getDisplayText()
getDisplayText in interface Twitter.ITweetpublic boolean equals(java.lang.Object obj)
equals in class java.lang.Objectpublic java.util.Date getCreatedAt()
getCreatedAt in interface Twitter.ITweetpublic java.lang.Long getId()
Twitter.ITweet
getId in interface Twitter.ITweetNote: 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()
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.ITweetgetRecipient().
Notes: This method is in ITweet as a convenience to allow the same code to process both Statuses and Messages where possible. It would be better named "getRecipients()", but for historical reasons it isn't.
public Place getPlace()
getPlace in interface Twitter.ITweetpublic User getRecipient()
public User getSender()
public java.lang.String getText()
Twitter.ITweetTwitter.toString()
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()
getSender()
getUser in interface Twitter.ITweetpublic int hashCode()
hashCode in class java.lang.Objectpublic 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 | ||||||||