winterwell.jtwitter
Class Twitter.Message

java.lang.Object
  extended by winterwell.jtwitter.Twitter.Message
All Implemented Interfaces:
Twitter.ITweet
Enclosing class:
Twitter

public static final class Twitter.Message
extends java.lang.Object
implements Twitter.ITweet

A Twitter direct message. Fields are null if unset.

Historical note: this class used to cover \@you mentions as well, but these are better described by Statuses.


Field Summary
 java.lang.Long inReplyToMessageId
          Equivalent to Twitter.Status.inReplyToStatusId *but null by default*.
 
Method Summary
 java.util.Date getCreatedAt()
           
 long getId()
           
 Twitter.User getRecipient()
           
 Twitter.User getSender()
           
 java.lang.String getText()
          The actual status text.
 Twitter.User getUser()
          This is equivalent to getSender()
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

inReplyToMessageId

public java.lang.Long inReplyToMessageId
Equivalent to Twitter.Status.inReplyToStatusId *but null by default*. If you want to use this, you must set it yourself. Strangely Twitter don't report the previous ID for messages.

Method Detail

getCreatedAt

public java.util.Date getCreatedAt()
Specified by:
getCreatedAt in interface Twitter.ITweet

getId

public long getId()
Specified by:
getId in interface Twitter.ITweet
Returns:
The Twitter id for this post. This is used by some API methods.

getRecipient

public Twitter.User getRecipient()
Returns:
the recipient (for messages sent by the authenticating user)

getSender

public Twitter.User getSender()

getText

public java.lang.String getText()
Description copied from interface: Twitter.ITweet
The actual status text. This is also returned by Object.toString()

Specified by:
getText in interface Twitter.ITweet

getUser

public Twitter.User getUser()
This is equivalent to getSender()

Specified by:
getUser in interface Twitter.ITweet

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object


Copyright © 2014 gvSIG Association. All Rights Reserved.