twitter4j.api
Interface DirectMessageMethodsAsync

All Known Subinterfaces:
AsyncTwitter
All Known Implementing Classes:
AsyncTwitterImpl

public interface DirectMessageMethodsAsync

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 void destroyDirectMessage(long id)
          Destroys the direct message specified in the required ID parameter.
 void getDirectMessages()
          Returns a list of the direct messages sent to the authenticating user.
 void getDirectMessages(Paging paging)
          Returns a list of the direct messages sent to the authenticating user.
 void getSentDirectMessages()
          Returns a list of the direct messages sent by the authenticating user.
 void getSentDirectMessages(Paging paging)
          Returns a list of the direct messages sent by the authenticating user.
 void sendDirectMessage(long userId, java.lang.String text)
          Sends a new direct message to the specified user from the authenticating user.
 void sendDirectMessage(java.lang.String screenName, java.lang.String text)
          Sends a new direct message to the specified user from the authenticating user.
 void showDirectMessage(long id)
          Returns a single direct message, specified by an id parameter.
 

Method Detail

getDirectMessages

void getDirectMessages()
Returns a list of the direct messages sent to the authenticating user.
This method calls http://api.twitter.com/1/direct_messages

See Also:
GET direct_messages | dev.twitter.com

getDirectMessages

void getDirectMessages(Paging paging)
Returns a list of the direct messages sent to the authenticating user.
This method calls http://api.twitter.com/1/direct_messages

Parameters:
paging - controls pagination
Since:
Twitter4J 2.0.1
See Also:
GET direct_messages | dev.twitter.com

getSentDirectMessages

void getSentDirectMessages()
Returns a list of the direct messages sent by the authenticating user.
This method calls http://api.twitter.com/1/direct_messages/sent

See Also:
GET direct_messages/sent | dev.twitter.com

getSentDirectMessages

void getSentDirectMessages(Paging paging)
Returns a list of the direct messages sent by the authenticating user.
This method calls http://api.twitter.com/1/direct_messages/sent

Parameters:
paging - controls pagination
Since:
Twitter4J 2.0.1
See Also:
GET direct_messages/sent | dev.twitter.com

sendDirectMessage

void sendDirectMessage(java.lang.String screenName,
                       java.lang.String text)
Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below. The text will be trimed if the length of the text is exceeding 140 characters.
This method calls http://api.twitter.com/1/direct_messages/new

Parameters:
screenName - the screen name of the user to whom send the direct message
text - The text of your direct message.
See Also:
POST direct_messages/new | dev.twitter.com

sendDirectMessage

void sendDirectMessage(long userId,
                       java.lang.String text)
Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below. The text will be trimed if the length of the text is exceeding 140 characters.
This method calls http://api.twitter.com/1/direct_messages/new

Parameters:
userId - the screen name of the user to whom send the direct message
text - The text of your direct message.
Since:
Twitter4j 2.1.0
See Also:
POST direct_messages/new | dev.twitter.com

destroyDirectMessage

void destroyDirectMessage(long id)
Destroys the direct message specified in the required ID parameter. The authenticating user must be the recipient of the specified direct message.
This method calls http://api.twitter.com/1/direct_messages/destroy

Parameters:
id - int
Since:
Twitter4J 2.0.1
See Also:
POST direct_messages/destroy/:id | dev.twitter.com

showDirectMessage

void showDirectMessage(long id)
Returns a single direct message, specified by an id parameter.
This method has not been finalized and the interface is subject to change in incompatible ways.
This method calls http://api.twitter.com/1/direct_messages/show/:id.json

Parameters:
id - message id
Since:
Twitter4J 2.1.9
See Also:
#newtwitter and the API - Twitter API Announcements | Google Group