twitter4j.api

## Interface DirectMessagesResourcesAsync

All Known Subinterfaces:
  AsyncTwitter

    public interface DirectMessagesResourcesAsync

Author:
  Joern Huxhorn - jhuxhorn at googlemail.com

### Method Summary

All Methods Instance Methods Abstract Methods
`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, String text)` Sends a new direct message to the specified user from the authenticating user.
`void` `sendDirectMessage(String screenName, 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 https://api.twitter.com/1.1/direct_messages

See Also:
  GET direct_messages | Twitter Developers

#### getDirectMessages

    void getDirectMessages(Paging paging)

Returns a list of the direct messages sent to the authenticating user.
This method calls https://api.twitter.com/1.1/direct_messages

Parameters:
  `paging` - controls pagination
Since:
  Twitter4J 2.0.1
See Also:
  GET direct_messages | Twitter Developers

#### getSentDirectMessages

    void getSentDirectMessages()

Returns a list of the direct messages sent by the authenticating user.
This method calls https://api.twitter.com/1.1/direct_messages/sent

See Also:
  GET direct_messages/sent | Twitter Developers

#### getSentDirectMessages

    void getSentDirectMessages(Paging paging)

Returns a list of the direct messages sent by the authenticating user.
This method calls https://api.twitter.com/1.1/direct_messages/sent

Parameters:
  `paging` - controls pagination
Since:
  Twitter4J 2.0.1
See Also:
  GET direct_messages/sent | Twitter Developers

#### 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 https://api.twitter.com/1.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

#### 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 https://api.twitter.com/1.1/direct_messages/destroy

Parameters:
  `id` - int
Since:
  Twitter4J 2.0.1
See Also:
  POST direct_messages/destroy/:id | Twitter Developers

#### sendDirectMessage

    void sendDirectMessage(long userId,
                           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 https://api.twitter.com/1.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 | Twitter Developers

#### sendDirectMessage

    void sendDirectMessage(String screenName,
                           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 https://api.twitter.com/1.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 | Twitter Developers