パッケージ twitter4j.v1
インタフェース DirectMessagesResources
public interface DirectMessagesResources
-
メソッドの概要
修飾子とタイプメソッド説明void
destroyDirectMessage
(long id) Deletes the direct message specified in the required ID parameter.getDirectMessages
(int count) Returns all Direct Message events (both sent and received) within the last 30 days.getDirectMessages
(int count, String cursor) Returns all Direct Message events (both sent and received) within the last 30 days.getDMImageAsStream
(String url) Returns a stream of the image included in direct messages.sendDirectMessage
(long userId, String text) Sends a new direct message to the specified user from the authenticating user.sendDirectMessage
(long userId, String text, long mediaId) Sends a new direct message to the specified user from the authenticating user.sendDirectMessage
(long userId, String text, String quickReplyResponse) Sends a new direct message to the specified user from the authenticating user.sendDirectMessage
(long userId, String text, QuickReply... quickReplies) Sends a new direct message to the specified user from the authenticating user.sendDirectMessage
(String screenName, String text) Sends a new direct message to the specified user from the authenticating user.showDirectMessage
(long id) Returns a single Direct Message event by the given id.
-
メソッドの詳細
-
getDirectMessages
Returns all Direct Message events (both sent and received) within the last 30 days. Sorted in reverse-chronological order.
This method calls https://api.twitter.com/1.1/direct_messages/events/list.json
Requests / 15-min window (user auth) 15/user- パラメータ:
count
- Max number of events to be returned. 20 default. 50 max.- 戻り値:
- List
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.7
- 関連項目:
-
getDirectMessages
Returns all Direct Message events (both sent and received) within the last 30 days. Sorted in reverse-chronological order.
This method calls https://api.twitter.com/1.1/direct_messages/events/list.json- パラメータ:
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.- 戻り値:
- List
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.7
- 関連項目:
-
showDirectMessage
Returns a single Direct Message event by the given id.
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/events/show.json- パラメータ:
id
- message id- 戻り値:
- DirectMessage
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 2.1.9
- 関連項目:
-
destroyDirectMessage
Deletes the direct message specified in the required ID parameter.
This method calls https://api.twitter.com/1.1/direct_messages/events/destroy.json- パラメータ:
id
- The id of the Direct Message event that should be deleted.- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 2.0.1
- 関連項目:
-
sendDirectMessage
DirectMessage sendDirectMessage(long userId, String text, QuickReply... quickReplies) throws TwitterException 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 trimmed if the length of the text is exceeding 140 characters.
This method calls https://dev.twitter.com/rest/reference/post/direct_messages/events/new- パラメータ:
userId
- the user id of the user to whom send the direct messagetext
- The text of your direct message.quickReplies
- Quick Replies- 戻り値:
- DirectMessage
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4j 2.1.0
- 関連項目:
-
sendDirectMessage
DirectMessage sendDirectMessage(long userId, String text, String quickReplyResponse) throws TwitterException 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 trimmed if the length of the text is exceeding 140 characters.
This method calls https://dev.twitter.com/rest/reference/post/direct_messages/events/new- パラメータ:
userId
- the user id of the user to whom send the direct messagetext
- The text of your direct message.quickReplyResponse
- Quick Reply response- 戻り値:
- DirectMessage
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4j 2.1.0
- 関連項目:
-
sendDirectMessage
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 trimmed if the length of the text is exceeding 140 characters.
This method calls https://dev.twitter.com/rest/reference/post/direct_messages/events/new- パラメータ:
userId
- the user id of the user to whom send the direct messagetext
- The text of your direct message.mediaId
- id of media attachment- 戻り値:
- DirectMessage
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.7
- 関連項目:
-
sendDirectMessage
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 trimmed if the length of the text is exceeding 140 characters.
This method calls https://dev.twitter.com/rest/reference/post/direct_messages/events/new- パラメータ:
userId
- the user id of the user to whom send the direct messagetext
- The text of your direct message.- 戻り値:
- DirectMessage
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 4.0.7
- 関連項目:
-
sendDirectMessage
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 trimmed if the length of the text is exceeding 140 characters.
This method calls https://api.twitter.com/1.1/direct_messages/new- パラメータ:
screenName
- the screen name of the user to whom send the direct messagetext
- The text of your direct message.- 戻り値:
- DirectMessage
- 例外:
TwitterException
- when Twitter service or network is unavailable- 関連項目:
-
getDMImageAsStream
Returns a stream of the image included in direct messages.- パラメータ:
url
- image url- 戻り値:
- InputStream
- 例外:
TwitterException
- when Twitter service or network is unavailable- 導入されたバージョン:
- Twitter4J 3.0.6
- 関連項目:
-