public interface DirectMessagesResources
Modifier and Type | Method and Description |
---|---|
DirectMessage |
destroyDirectMessage(long id)
Deletes the direct message specified in the required ID parameter.
|
ResponseList<DirectMessage> |
getDirectMessages()
Deprecated.
use
getDirectMessages(int) instead |
DirectMessageList |
getDirectMessages(int count)
Returns all Direct Message events (both sent and received) within the last 30 days.
|
DirectMessageList |
getDirectMessages(int count,
String cursor)
Returns all Direct Message events (both sent and received) within the last 30 days.
|
ResponseList<DirectMessage> |
getDirectMessages(Paging paging)
Deprecated.
use
getDirectMessages(int) instead |
InputStream |
getDMImageAsStream(String url)
Returns a stream of the image included in direct messages.
|
ResponseList<DirectMessage> |
getSentDirectMessages()
Deprecated.
use
getDirectMessages(int) instead |
ResponseList<DirectMessage> |
getSentDirectMessages(Paging paging)
Deprecated.
use
getDirectMessages(int) instead |
DirectMessage |
sendDirectMessage(long userId,
String text)
Sends a new direct message to the specified user from the authenticating user.
|
DirectMessage |
sendDirectMessage(long userId,
String text,
long mediaId)
Sends a new direct message to the specified user from the authenticating user.
|
DirectMessage |
sendDirectMessage(String screenName,
String text)
Sends a new direct message to the specified user from the authenticating user.
|
DirectMessage |
showDirectMessage(long id)
Returns a single Direct Message event by the given id.
|
ResponseList<DirectMessage> getDirectMessages() throws TwitterException
getDirectMessages(int)
insteadTwitterException
- when Twitter service or network is unavailableResponseList<DirectMessage> getDirectMessages(Paging paging) throws TwitterException
getDirectMessages(int)
insteadpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailableResponseList<DirectMessage> getSentDirectMessages() throws TwitterException
getDirectMessages(int)
insteadTwitterException
- when Twitter service or network is unavailableResponseList<DirectMessage> getSentDirectMessages(Paging paging) throws TwitterException
getDirectMessages(int)
insteadpaging
- controls pagination. Supports since_id, max_id, count and page parameters.TwitterException
- when Twitter service or network is unavailableDirectMessageList getDirectMessages(int count) throws TwitterException
count
- Max number of events to be returned. 20 default. 50 max.TwitterException
- when Twitter service or network is unavailableDirectMessageList getDirectMessages(int count, String cursor) throws TwitterException
count
- Max number of events to be returned. 20 default. 50 max.cursor
- For paging through result sets greater than 1 page, use the “next_cursor” property from the previous request.TwitterException
- when Twitter service or network is unavailableDirectMessage showDirectMessage(long id) throws TwitterException
id
- message idTwitterException
- when Twitter service or network is unavailableDirectMessage destroyDirectMessage(long id) throws TwitterException
id
- The id of the Direct Message event that should be deleted.TwitterException
- when Twitter service or network is unavailableDirectMessage sendDirectMessage(long userId, String text) throws TwitterException
userId
- the user id of the user to whom send the direct messagetext
- The text of your direct message.TwitterException
- when Twitter service or network is unavailableDirectMessage sendDirectMessage(long userId, String text, long mediaId) throws TwitterException
userId
- the user id of the user to whom send the direct messagetext
- The text of your direct message.mediaId
- id of media attachmentTwitterException
- when Twitter service or network is unavailableDirectMessage sendDirectMessage(String screenName, String text) throws TwitterException
screenName
- the screen name of the user to whom send the direct messagetext
- The text of your direct message.TwitterException
- when Twitter service or network is unavailableInputStream getDMImageAsStream(String url) throws TwitterException
url
- image urlTwitterException
- when Twitter service or network is unavailableCopyright © 2018. All rights reserved.