twitter4j.api
Interface DirectMessageMethodsAsync

All Known Implementing Classes:
AsyncTwitter

public interface DirectMessageMethodsAsync

Author:
Joern Huxhorn - jhuxhorn at googlemail.com

Method Summary
 void destroyDirectMessage(int id)
          Delete specified direct message
This method calls http://api.twitter.com/1/direct_messages/destroy
 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(int 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.
 

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:
Twitter API Wiki / Twitter REST API Method: direct_messages

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:
Twitter API Wiki / Twitter REST API Method: direct_messages

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:
Twitter API Wiki / Twitter REST API Method: direct_messages%C2%A0sent

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:
Twitter API Wiki / Twitter REST API Method: direct_messages%C2%A0sent

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:
Twitter API Wiki / Twitter REST API Method: direct_messages%C2%A0new

sendDirectMessage

void sendDirectMessage(int 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:
Twitter API Wiki / Twitter REST API Method: direct_messages%C2%A0new

destroyDirectMessage

void destroyDirectMessage(int id)
Delete specified direct message
This method calls http://api.twitter.com/1/direct_messages/destroy

Parameters:
id - int
Since:
Twitter4J 2.0.1
See Also:
Twitter API Wiki / Twitter REST API Method: direct_messages%C2%A0destroy