DirectMessagesResources.html 34 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596
  1. <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
  2. <!-- NewPage -->
  3. <html lang="en">
  4. <head>
  5. <!-- Generated by javadoc (1.8.0_161) on Thu Aug 16 18:54:14 JST 2018 -->
  6. <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
  7. <title>DirectMessagesResources (twitter4j-core 4.0.7 API)</title>
  8. <meta name="date" content="2018-08-16">
  9. <link rel="stylesheet" type="text/css" href="../../stylesheet.css" title="Style">
  10. <script type="text/javascript" src="../../script.js"></script>
  11. </head>
  12. <body>
  13. <script type="text/javascript"><!--
  14. try {
  15. if (location.href.indexOf('is-external=true') == -1) {
  16. parent.document.title="DirectMessagesResources (twitter4j-core 4.0.7 API)";
  17. }
  18. }
  19. catch(err) {
  20. }
  21. //-->
  22. var methods = {"i0":6,"i1":38,"i2":6,"i3":6,"i4":38,"i5":6,"i6":38,"i7":38,"i8":6,"i9":6,"i10":6,"i11":6};
  23. var tabs = {65535:["t0","All Methods"],2:["t2","Instance Methods"],4:["t3","Abstract Methods"],32:["t6","Deprecated Methods"]};
  24. var altColor = "altColor";
  25. var rowColor = "rowColor";
  26. var tableTab = "tableTab";
  27. var activeTableTab = "activeTableTab";
  28. </script>
  29. <noscript>
  30. <div>JavaScript is disabled on your browser.</div>
  31. </noscript>
  32. <!-- ========= START OF TOP NAVBAR ======= -->
  33. <div class="topNav"><a name="navbar.top">
  34. <!-- -->
  35. </a>
  36. <div class="skipNav"><a href="#skip.navbar.top" title="Skip navigation links">Skip navigation links</a></div>
  37. <a name="navbar.top.firstrow">
  38. <!-- -->
  39. </a>
  40. <ul class="navList" title="Navigation">
  41. <li><a href="../../overview-summary.html">Overview</a></li>
  42. <li><a href="package-summary.html">Package</a></li>
  43. <li class="navBarCell1Rev">Class</li>
  44. <li><a href="class-use/DirectMessagesResources.html">Use</a></li>
  45. <li><a href="package-tree.html">Tree</a></li>
  46. <li><a href="../../deprecated-list.html">Deprecated</a></li>
  47. <li><a href="../../index-all.html">Index</a></li>
  48. <li><a href="../../help-doc.html">Help</a></li>
  49. </ul>
  50. </div>
  51. <div class="subNav">
  52. <ul class="navList">
  53. <li>Prev&nbsp;Class</li>
  54. <li><a href="../../twitter4j/api/FavoritesResources.html" title="interface in twitter4j.api"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  55. </ul>
  56. <ul class="navList">
  57. <li><a href="../../index.html?twitter4j/api/DirectMessagesResources.html" target="_top">Frames</a></li>
  58. <li><a href="DirectMessagesResources.html" target="_top">No&nbsp;Frames</a></li>
  59. </ul>
  60. <ul class="navList" id="allclasses_navbar_top">
  61. <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  62. </ul>
  63. <div>
  64. <script type="text/javascript"><!--
  65. allClassesLink = document.getElementById("allclasses_navbar_top");
  66. if(window==top) {
  67. allClassesLink.style.display = "block";
  68. }
  69. else {
  70. allClassesLink.style.display = "none";
  71. }
  72. //-->
  73. </script>
  74. </div>
  75. <div>
  76. <ul class="subNavList">
  77. <li>Summary:&nbsp;</li>
  78. <li>Nested&nbsp;|&nbsp;</li>
  79. <li>Field&nbsp;|&nbsp;</li>
  80. <li>Constr&nbsp;|&nbsp;</li>
  81. <li><a href="#method.summary">Method</a></li>
  82. </ul>
  83. <ul class="subNavList">
  84. <li>Detail:&nbsp;</li>
  85. <li>Field&nbsp;|&nbsp;</li>
  86. <li>Constr&nbsp;|&nbsp;</li>
  87. <li><a href="#method.detail">Method</a></li>
  88. </ul>
  89. </div>
  90. <a name="skip.navbar.top">
  91. <!-- -->
  92. </a></div>
  93. <!-- ========= END OF TOP NAVBAR ========= -->
  94. <!-- ======== START OF CLASS DATA ======== -->
  95. <div class="header">
  96. <div class="subTitle">twitter4j.api</div>
  97. <h2 title="Interface DirectMessagesResources" class="title">Interface DirectMessagesResources</h2>
  98. </div>
  99. <div class="contentContainer">
  100. <div class="description">
  101. <ul class="blockList">
  102. <li class="blockList">
  103. <dl>
  104. <dt>All Known Subinterfaces:</dt>
  105. <dd><a href="../../twitter4j/Twitter.html" title="interface in twitter4j">Twitter</a></dd>
  106. </dl>
  107. <hr>
  108. <br>
  109. <pre>public interface <span class="typeNameLabel">DirectMessagesResources</span></pre>
  110. <dl>
  111. <dt><span class="simpleTagLabel">Author:</span></dt>
  112. <dd>Joern Huxhorn - jhuxhorn at googlemail.com</dd>
  113. </dl>
  114. </li>
  115. </ul>
  116. </div>
  117. <div class="summary">
  118. <ul class="blockList">
  119. <li class="blockList">
  120. <!-- ========== METHOD SUMMARY =========== -->
  121. <ul class="blockList">
  122. <li class="blockList"><a name="method.summary">
  123. <!-- -->
  124. </a>
  125. <h3>Method Summary</h3>
  126. <table class="memberSummary" border="0" cellpadding="3" cellspacing="0" summary="Method Summary table, listing methods, and an explanation">
  127. <caption><span id="t0" class="activeTableTab"><span>All Methods</span><span class="tabEnd">&nbsp;</span></span><span id="t2" class="tableTab"><span><a href="javascript:show(2);">Instance Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t3" class="tableTab"><span><a href="javascript:show(4);">Abstract Methods</a></span><span class="tabEnd">&nbsp;</span></span><span id="t6" class="tableTab"><span><a href="javascript:show(32);">Deprecated Methods</a></span><span class="tabEnd">&nbsp;</span></span></caption>
  128. <tr>
  129. <th class="colFirst" scope="col">Modifier and Type</th>
  130. <th class="colLast" scope="col">Method and Description</th>
  131. </tr>
  132. <tr id="i0" class="altColor">
  133. <td class="colFirst"><code><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a></code></td>
  134. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#destroyDirectMessage-long-">destroyDirectMessage</a></span>(long&nbsp;id)</code>
  135. <div class="block">Deletes the direct message specified in the required ID parameter.</div>
  136. </td>
  137. </tr>
  138. <tr id="i1" class="rowColor">
  139. <td class="colFirst"><code><a href="../../twitter4j/ResponseList.html" title="interface in twitter4j">ResponseList</a>&lt;<a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&gt;</code></td>
  140. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages--">getDirectMessages</a></span>()</code>
  141. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  142. <div class="block"><span class="deprecationComment">use <a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-"><code>getDirectMessages(int)</code></a> instead</span></div>
  143. </div>
  144. </td>
  145. </tr>
  146. <tr id="i2" class="altColor">
  147. <td class="colFirst"><code><a href="../../twitter4j/DirectMessageList.html" title="interface in twitter4j">DirectMessageList</a></code></td>
  148. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-">getDirectMessages</a></span>(int&nbsp;count)</code>
  149. <div class="block">Returns all Direct Message events (both sent and received) within the last 30 days.</div>
  150. </td>
  151. </tr>
  152. <tr id="i3" class="rowColor">
  153. <td class="colFirst"><code><a href="../../twitter4j/DirectMessageList.html" title="interface in twitter4j">DirectMessageList</a></code></td>
  154. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-java.lang.String-">getDirectMessages</a></span>(int&nbsp;count,
  155. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;cursor)</code>
  156. <div class="block">Returns all Direct Message events (both sent and received) within the last 30 days.</div>
  157. </td>
  158. </tr>
  159. <tr id="i4" class="altColor">
  160. <td class="colFirst"><code><a href="../../twitter4j/ResponseList.html" title="interface in twitter4j">ResponseList</a>&lt;<a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&gt;</code></td>
  161. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-twitter4j.Paging-">getDirectMessages</a></span>(<a href="../../twitter4j/Paging.html" title="class in twitter4j">Paging</a>&nbsp;paging)</code>
  162. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  163. <div class="block"><span class="deprecationComment">use <a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-"><code>getDirectMessages(int)</code></a> instead</span></div>
  164. </div>
  165. </td>
  166. </tr>
  167. <tr id="i5" class="rowColor">
  168. <td class="colFirst"><code><a href="http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a></code></td>
  169. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#getDMImageAsStream-java.lang.String-">getDMImageAsStream</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url)</code>
  170. <div class="block">Returns a stream of the image included in direct messages.</div>
  171. </td>
  172. </tr>
  173. <tr id="i6" class="altColor">
  174. <td class="colFirst"><code><a href="../../twitter4j/ResponseList.html" title="interface in twitter4j">ResponseList</a>&lt;<a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&gt;</code></td>
  175. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#getSentDirectMessages--">getSentDirectMessages</a></span>()</code>
  176. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  177. <div class="block"><span class="deprecationComment">use <a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-"><code>getDirectMessages(int)</code></a> instead</span></div>
  178. </div>
  179. </td>
  180. </tr>
  181. <tr id="i7" class="rowColor">
  182. <td class="colFirst"><code><a href="../../twitter4j/ResponseList.html" title="interface in twitter4j">ResponseList</a>&lt;<a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&gt;</code></td>
  183. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#getSentDirectMessages-twitter4j.Paging-">getSentDirectMessages</a></span>(<a href="../../twitter4j/Paging.html" title="class in twitter4j">Paging</a>&nbsp;paging)</code>
  184. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;
  185. <div class="block"><span class="deprecationComment">use <a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-"><code>getDirectMessages(int)</code></a> instead</span></div>
  186. </div>
  187. </td>
  188. </tr>
  189. <tr id="i8" class="altColor">
  190. <td class="colFirst"><code><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a></code></td>
  191. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#sendDirectMessage-long-java.lang.String-">sendDirectMessage</a></span>(long&nbsp;userId,
  192. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text)</code>
  193. <div class="block">Sends a new direct message to the specified user from the authenticating user.</div>
  194. </td>
  195. </tr>
  196. <tr id="i9" class="rowColor">
  197. <td class="colFirst"><code><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a></code></td>
  198. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#sendDirectMessage-long-java.lang.String-long-">sendDirectMessage</a></span>(long&nbsp;userId,
  199. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text,
  200. long&nbsp;mediaId)</code>
  201. <div class="block">Sends a new direct message to the specified user from the authenticating user.</div>
  202. </td>
  203. </tr>
  204. <tr id="i10" class="altColor">
  205. <td class="colFirst"><code><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a></code></td>
  206. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#sendDirectMessage-java.lang.String-java.lang.String-">sendDirectMessage</a></span>(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;screenName,
  207. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text)</code>
  208. <div class="block">Sends a new direct message to the specified user from the authenticating user.</div>
  209. </td>
  210. </tr>
  211. <tr id="i11" class="rowColor">
  212. <td class="colFirst"><code><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a></code></td>
  213. <td class="colLast"><code><span class="memberNameLink"><a href="../../twitter4j/api/DirectMessagesResources.html#showDirectMessage-long-">showDirectMessage</a></span>(long&nbsp;id)</code>
  214. <div class="block">Returns a single Direct Message event by the given id.</div>
  215. </td>
  216. </tr>
  217. </table>
  218. </li>
  219. </ul>
  220. </li>
  221. </ul>
  222. </div>
  223. <div class="details">
  224. <ul class="blockList">
  225. <li class="blockList">
  226. <!-- ============ METHOD DETAIL ========== -->
  227. <ul class="blockList">
  228. <li class="blockList"><a name="method.detail">
  229. <!-- -->
  230. </a>
  231. <h3>Method Detail</h3>
  232. <a name="getDirectMessages--">
  233. <!-- -->
  234. </a>
  235. <ul class="blockList">
  236. <li class="blockList">
  237. <h4>getDirectMessages</h4>
  238. <pre><a href="../../twitter4j/ResponseList.html" title="interface in twitter4j">ResponseList</a>&lt;<a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&gt;&nbsp;getDirectMessages()
  239. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  240. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">use <a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-"><code>getDirectMessages(int)</code></a> instead</span></div>
  241. <div class="block">Returns a list of the direct messages sent to the authenticating user.
  242. <br>This method calls https://api.twitter.com/1.1/direct_messages</div>
  243. <dl>
  244. <dt><span class="returnLabel">Returns:</span></dt>
  245. <dd>List</dd>
  246. <dt><span class="throwsLabel">Throws:</span></dt>
  247. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  248. <dt><span class="seeLabel">See Also:</span></dt>
  249. <dd><a href="https://dev.twitter.com/docs/api/1.1/get/direct_messages">GET direct_messages | Twitter Developers</a></dd>
  250. </dl>
  251. </li>
  252. </ul>
  253. <a name="getDirectMessages-twitter4j.Paging-">
  254. <!-- -->
  255. </a>
  256. <ul class="blockList">
  257. <li class="blockList">
  258. <h4>getDirectMessages</h4>
  259. <pre><a href="../../twitter4j/ResponseList.html" title="interface in twitter4j">ResponseList</a>&lt;<a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&gt;&nbsp;getDirectMessages(<a href="../../twitter4j/Paging.html" title="class in twitter4j">Paging</a>&nbsp;paging)
  260. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  261. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">use <a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-"><code>getDirectMessages(int)</code></a> instead</span></div>
  262. <div class="block">Returns a list of the direct messages sent to the authenticating user.
  263. <br>This method calls https://api.twitter.com/1.1/direct_messages</div>
  264. <dl>
  265. <dt><span class="paramLabel">Parameters:</span></dt>
  266. <dd><code>paging</code> - controls pagination. Supports since_id, max_id, count and page parameters.</dd>
  267. <dt><span class="returnLabel">Returns:</span></dt>
  268. <dd>List</dd>
  269. <dt><span class="throwsLabel">Throws:</span></dt>
  270. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  271. <dt><span class="seeLabel">See Also:</span></dt>
  272. <dd><a href="https://dev.twitter.com/docs/api/1.1/get/direct_messages">GET direct_messages | Twitter Developers</a></dd>
  273. </dl>
  274. </li>
  275. </ul>
  276. <a name="getSentDirectMessages--">
  277. <!-- -->
  278. </a>
  279. <ul class="blockList">
  280. <li class="blockList">
  281. <h4>getSentDirectMessages</h4>
  282. <pre><a href="../../twitter4j/ResponseList.html" title="interface in twitter4j">ResponseList</a>&lt;<a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&gt;&nbsp;getSentDirectMessages()
  283. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  284. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">use <a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-"><code>getDirectMessages(int)</code></a> instead</span></div>
  285. <div class="block">Returns a list of the direct messages sent by the authenticating user.
  286. <br>This method calls https://api.twitter.com/1.1/direct_messages/sent</div>
  287. <dl>
  288. <dt><span class="returnLabel">Returns:</span></dt>
  289. <dd>List</dd>
  290. <dt><span class="throwsLabel">Throws:</span></dt>
  291. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  292. <dt><span class="seeLabel">See Also:</span></dt>
  293. <dd><a href="https://dev.twitter.com/docs/api/1.1/get/direct_messages/sent">GET direct_messages/sent | Twitter Developers</a></dd>
  294. </dl>
  295. </li>
  296. </ul>
  297. <a name="getSentDirectMessages-twitter4j.Paging-">
  298. <!-- -->
  299. </a>
  300. <ul class="blockList">
  301. <li class="blockList">
  302. <h4>getSentDirectMessages</h4>
  303. <pre><a href="../../twitter4j/ResponseList.html" title="interface in twitter4j">ResponseList</a>&lt;<a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&gt;&nbsp;getSentDirectMessages(<a href="../../twitter4j/Paging.html" title="class in twitter4j">Paging</a>&nbsp;paging)
  304. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  305. <div class="block"><span class="deprecatedLabel">Deprecated.</span>&nbsp;<span class="deprecationComment">use <a href="../../twitter4j/api/DirectMessagesResources.html#getDirectMessages-int-"><code>getDirectMessages(int)</code></a> instead</span></div>
  306. <div class="block">Returns a list of the direct messages sent by the authenticating user.
  307. <br>This method calls https://api.twitter.com/1.1/direct_messages/sent</div>
  308. <dl>
  309. <dt><span class="paramLabel">Parameters:</span></dt>
  310. <dd><code>paging</code> - controls pagination. Supports since_id, max_id, count and page parameters.</dd>
  311. <dt><span class="returnLabel">Returns:</span></dt>
  312. <dd>List</dd>
  313. <dt><span class="throwsLabel">Throws:</span></dt>
  314. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  315. <dt><span class="simpleTagLabel">Since:</span></dt>
  316. <dd>Twitter4J 2.0.1</dd>
  317. <dt><span class="seeLabel">See Also:</span></dt>
  318. <dd><a href="https://dev.twitter.com/docs/api/1.1/get/direct_messages/sent">GET direct_messages/sent | Twitter Developers</a></dd>
  319. </dl>
  320. </li>
  321. </ul>
  322. <a name="getDirectMessages-int-">
  323. <!-- -->
  324. </a>
  325. <ul class="blockList">
  326. <li class="blockList">
  327. <h4>getDirectMessages</h4>
  328. <pre><a href="../../twitter4j/DirectMessageList.html" title="interface in twitter4j">DirectMessageList</a>&nbsp;getDirectMessages(int&nbsp;count)
  329. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  330. <div class="block">Returns all Direct Message events (both sent and received) within the last 30 days. Sorted in reverse-chronological order.
  331. <br>This method calls https://api.twitter.com/1.1/direct_messages/events/list.json</div>
  332. <dl>
  333. <dt><span class="paramLabel">Parameters:</span></dt>
  334. <dd><code>count</code> - Max number of events to be returned. 20 default. 50 max.</dd>
  335. <dt><span class="returnLabel">Returns:</span></dt>
  336. <dd>List</dd>
  337. <dt><span class="throwsLabel">Throws:</span></dt>
  338. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  339. <dt><span class="simpleTagLabel">Since:</span></dt>
  340. <dd>Twitter4J 4.0.7</dd>
  341. <dt><span class="seeLabel">See Also:</span></dt>
  342. <dd><a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/list-events.html">GET direct_messages/events/list — Twitter Developers</a></dd>
  343. </dl>
  344. </li>
  345. </ul>
  346. <a name="getDirectMessages-int-java.lang.String-">
  347. <!-- -->
  348. </a>
  349. <ul class="blockList">
  350. <li class="blockList">
  351. <h4>getDirectMessages</h4>
  352. <pre><a href="../../twitter4j/DirectMessageList.html" title="interface in twitter4j">DirectMessageList</a>&nbsp;getDirectMessages(int&nbsp;count,
  353. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;cursor)
  354. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  355. <div class="block">Returns all Direct Message events (both sent and received) within the last 30 days. Sorted in reverse-chronological order.
  356. <br>This method calls https://api.twitter.com/1.1/direct_messages/events/list.json</div>
  357. <dl>
  358. <dt><span class="paramLabel">Parameters:</span></dt>
  359. <dd><code>count</code> - Max number of events to be returned. 20 default. 50 max.</dd>
  360. <dd><code>cursor</code> - For paging through result sets greater than 1 page, use the “next_cursor” property from the previous request.</dd>
  361. <dt><span class="returnLabel">Returns:</span></dt>
  362. <dd>List</dd>
  363. <dt><span class="throwsLabel">Throws:</span></dt>
  364. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  365. <dt><span class="simpleTagLabel">Since:</span></dt>
  366. <dd>Twitter4J 4.0.7</dd>
  367. <dt><span class="seeLabel">See Also:</span></dt>
  368. <dd><a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/list-events.html">GET direct_messages/events/list — Twitter Developers</a></dd>
  369. </dl>
  370. </li>
  371. </ul>
  372. <a name="showDirectMessage-long-">
  373. <!-- -->
  374. </a>
  375. <ul class="blockList">
  376. <li class="blockList">
  377. <h4>showDirectMessage</h4>
  378. <pre><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&nbsp;showDirectMessage(long&nbsp;id)
  379. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  380. <div class="block">Returns a single Direct Message event by the given id.
  381. <br>This method has not been finalized and the interface is subject to change in incompatible ways.
  382. <br>This method calls https://api.twitter.com/1.1/direct_messages/events/show.json</div>
  383. <dl>
  384. <dt><span class="paramLabel">Parameters:</span></dt>
  385. <dd><code>id</code> - message id</dd>
  386. <dt><span class="returnLabel">Returns:</span></dt>
  387. <dd>DirectMessage</dd>
  388. <dt><span class="throwsLabel">Throws:</span></dt>
  389. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  390. <dt><span class="simpleTagLabel">Since:</span></dt>
  391. <dd>Twitter4J 2.1.9</dd>
  392. <dt><span class="seeLabel">See Also:</span></dt>
  393. <dd><a href="http://groups.google.com/group/twitter-api-announce/msg/34909da7c399169e">#newtwitter and the API - Twitter API Announcements | Google Group</a></dd>
  394. </dl>
  395. </li>
  396. </ul>
  397. <a name="destroyDirectMessage-long-">
  398. <!-- -->
  399. </a>
  400. <ul class="blockList">
  401. <li class="blockList">
  402. <h4>destroyDirectMessage</h4>
  403. <pre><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&nbsp;destroyDirectMessage(long&nbsp;id)
  404. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  405. <div class="block">Deletes the direct message specified in the required ID parameter.
  406. <br>This method calls https://api.twitter.com/1.1/direct_messages/events/destroy.json</div>
  407. <dl>
  408. <dt><span class="paramLabel">Parameters:</span></dt>
  409. <dd><code>id</code> - The id of the Direct Message event that should be deleted.</dd>
  410. <dt><span class="returnLabel">Returns:</span></dt>
  411. <dd>a dummy DirectMessage object. Starting from Twitter4J 4.0.7, all getters will throw IllegalStateException due to the API limitation. The return value will be changed to void in the furure release.</dd>
  412. <dt><span class="throwsLabel">Throws:</span></dt>
  413. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  414. <dt><span class="simpleTagLabel">Since:</span></dt>
  415. <dd>Twitter4J 2.0.1</dd>
  416. <dt><span class="seeLabel">See Also:</span></dt>
  417. <dd><a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/delete-message-event.html">DELETE direct_messages/events/destroy — Twitter Developers</a></dd>
  418. </dl>
  419. </li>
  420. </ul>
  421. <a name="sendDirectMessage-long-java.lang.String-">
  422. <!-- -->
  423. </a>
  424. <ul class="blockList">
  425. <li class="blockList">
  426. <h4>sendDirectMessage</h4>
  427. <pre><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&nbsp;sendDirectMessage(long&nbsp;userId,
  428. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text)
  429. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  430. <div class="block">Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below.
  431. The text will be trimmed if the length of the text is exceeding 140 characters.
  432. <br>This method calls https://dev.twitter.com/rest/reference/post/direct_messages/events/new</div>
  433. <dl>
  434. <dt><span class="paramLabel">Parameters:</span></dt>
  435. <dd><code>userId</code> - the user id of the user to whom send the direct message</dd>
  436. <dd><code>text</code> - The text of your direct message.</dd>
  437. <dt><span class="returnLabel">Returns:</span></dt>
  438. <dd>DirectMessage</dd>
  439. <dt><span class="throwsLabel">Throws:</span></dt>
  440. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  441. <dt><span class="simpleTagLabel">Since:</span></dt>
  442. <dd>Twitter4j 2.1.0</dd>
  443. <dt><span class="seeLabel">See Also:</span></dt>
  444. <dd><a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event">POST direct_messages/events/new (message_create) — Twitter Developers</a></dd>
  445. </dl>
  446. </li>
  447. </ul>
  448. <a name="sendDirectMessage-long-java.lang.String-long-">
  449. <!-- -->
  450. </a>
  451. <ul class="blockList">
  452. <li class="blockList">
  453. <h4>sendDirectMessage</h4>
  454. <pre><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&nbsp;sendDirectMessage(long&nbsp;userId,
  455. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text,
  456. long&nbsp;mediaId)
  457. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  458. <div class="block">Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below.
  459. The text will be trimmed if the length of the text is exceeding 140 characters.
  460. <br>This method calls https://dev.twitter.com/rest/reference/post/direct_messages/events/new</div>
  461. <dl>
  462. <dt><span class="paramLabel">Parameters:</span></dt>
  463. <dd><code>userId</code> - the user id of the user to whom send the direct message</dd>
  464. <dd><code>text</code> - The text of your direct message.</dd>
  465. <dd><code>mediaId</code> - id of media attachment</dd>
  466. <dt><span class="returnLabel">Returns:</span></dt>
  467. <dd>DirectMessage</dd>
  468. <dt><span class="throwsLabel">Throws:</span></dt>
  469. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  470. <dt><span class="simpleTagLabel">Since:</span></dt>
  471. <dd>Twitter4J 4.0.7</dd>
  472. <dt><span class="seeLabel">See Also:</span></dt>
  473. <dd><a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event">POST direct_messages/events/new (message_create) — Twitter Developers</a></dd>
  474. </dl>
  475. </li>
  476. </ul>
  477. <a name="sendDirectMessage-java.lang.String-java.lang.String-">
  478. <!-- -->
  479. </a>
  480. <ul class="blockList">
  481. <li class="blockList">
  482. <h4>sendDirectMessage</h4>
  483. <pre><a href="../../twitter4j/DirectMessage.html" title="interface in twitter4j">DirectMessage</a>&nbsp;sendDirectMessage(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;screenName,
  484. <a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;text)
  485. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  486. <div class="block">Sends a new direct message to the specified user from the authenticating user. Requires both the user and text parameters below.
  487. The text will be trimmed if the length of the text is exceeding 140 characters.
  488. <br>This method calls https://api.twitter.com/1.1/direct_messages/new</div>
  489. <dl>
  490. <dt><span class="paramLabel">Parameters:</span></dt>
  491. <dd><code>screenName</code> - the screen name of the user to whom send the direct message</dd>
  492. <dd><code>text</code> - The text of your direct message.</dd>
  493. <dt><span class="returnLabel">Returns:</span></dt>
  494. <dd>DirectMessage</dd>
  495. <dt><span class="throwsLabel">Throws:</span></dt>
  496. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  497. <dt><span class="seeLabel">See Also:</span></dt>
  498. <dd><a href="https://developer.twitter.com/en/docs/direct-messages/sending-and-receiving/api-reference/new-event">POST direct_messages/events/new (message_create) — Twitter Developers</a></dd>
  499. </dl>
  500. </li>
  501. </ul>
  502. <a name="getDMImageAsStream-java.lang.String-">
  503. <!-- -->
  504. </a>
  505. <ul class="blockListLast">
  506. <li class="blockList">
  507. <h4>getDMImageAsStream</h4>
  508. <pre><a href="http://docs.oracle.com/javase/8/docs/api/java/io/InputStream.html?is-external=true" title="class or interface in java.io">InputStream</a>&nbsp;getDMImageAsStream(<a href="http://docs.oracle.com/javase/8/docs/api/java/lang/String.html?is-external=true" title="class or interface in java.lang">String</a>&nbsp;url)
  509. throws <a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></pre>
  510. <div class="block">Returns a stream of the image included in direct messages.</div>
  511. <dl>
  512. <dt><span class="paramLabel">Parameters:</span></dt>
  513. <dd><code>url</code> - image url</dd>
  514. <dt><span class="returnLabel">Returns:</span></dt>
  515. <dd>InputStream</dd>
  516. <dt><span class="throwsLabel">Throws:</span></dt>
  517. <dd><code><a href="../../twitter4j/TwitterException.html" title="class in twitter4j">TwitterException</a></code> - when Twitter service or network is unavailable</dd>
  518. <dt><span class="simpleTagLabel">Since:</span></dt>
  519. <dd>Twitter4J 3.0.6</dd>
  520. <dt><span class="seeLabel">See Also:</span></dt>
  521. <dd><a href="https://dev.twitter.com/discussions/24255">Access media shared in direct messages | Twitter Developers</a></dd>
  522. </dl>
  523. </li>
  524. </ul>
  525. </li>
  526. </ul>
  527. </li>
  528. </ul>
  529. </div>
  530. </div>
  531. <!-- ========= END OF CLASS DATA ========= -->
  532. <!-- ======= START OF BOTTOM NAVBAR ====== -->
  533. <div class="bottomNav"><a name="navbar.bottom">
  534. <!-- -->
  535. </a>
  536. <div class="skipNav"><a href="#skip.navbar.bottom" title="Skip navigation links">Skip navigation links</a></div>
  537. <a name="navbar.bottom.firstrow">
  538. <!-- -->
  539. </a>
  540. <ul class="navList" title="Navigation">
  541. <li><a href="../../overview-summary.html">Overview</a></li>
  542. <li><a href="package-summary.html">Package</a></li>
  543. <li class="navBarCell1Rev">Class</li>
  544. <li><a href="class-use/DirectMessagesResources.html">Use</a></li>
  545. <li><a href="package-tree.html">Tree</a></li>
  546. <li><a href="../../deprecated-list.html">Deprecated</a></li>
  547. <li><a href="../../index-all.html">Index</a></li>
  548. <li><a href="../../help-doc.html">Help</a></li>
  549. </ul>
  550. </div>
  551. <div class="subNav">
  552. <ul class="navList">
  553. <li>Prev&nbsp;Class</li>
  554. <li><a href="../../twitter4j/api/FavoritesResources.html" title="interface in twitter4j.api"><span class="typeNameLink">Next&nbsp;Class</span></a></li>
  555. </ul>
  556. <ul class="navList">
  557. <li><a href="../../index.html?twitter4j/api/DirectMessagesResources.html" target="_top">Frames</a></li>
  558. <li><a href="DirectMessagesResources.html" target="_top">No&nbsp;Frames</a></li>
  559. </ul>
  560. <ul class="navList" id="allclasses_navbar_bottom">
  561. <li><a href="../../allclasses-noframe.html">All&nbsp;Classes</a></li>
  562. </ul>
  563. <div>
  564. <script type="text/javascript"><!--
  565. allClassesLink = document.getElementById("allclasses_navbar_bottom");
  566. if(window==top) {
  567. allClassesLink.style.display = "block";
  568. }
  569. else {
  570. allClassesLink.style.display = "none";
  571. }
  572. //-->
  573. </script>
  574. </div>
  575. <div>
  576. <ul class="subNavList">
  577. <li>Summary:&nbsp;</li>
  578. <li>Nested&nbsp;|&nbsp;</li>
  579. <li>Field&nbsp;|&nbsp;</li>
  580. <li>Constr&nbsp;|&nbsp;</li>
  581. <li><a href="#method.summary">Method</a></li>
  582. </ul>
  583. <ul class="subNavList">
  584. <li>Detail:&nbsp;</li>
  585. <li>Field&nbsp;|&nbsp;</li>
  586. <li>Constr&nbsp;|&nbsp;</li>
  587. <li><a href="#method.detail">Method</a></li>
  588. </ul>
  589. </div>
  590. <a name="skip.navbar.bottom">
  591. <!-- -->
  592. </a></div>
  593. <!-- ======== END OF BOTTOM NAVBAR ======= -->
  594. <p class="legalCopy"><small>Copyright &#169; 2018. All rights reserved.</small></p>
  595. </body>
  596. </html>