Changeset 15041
- Timestamp:
- 07/02/08 13:56:31 (5 years ago)
- Location:
- lang/java/sabotter/trunk/src/jp/xet/eclipse/sabotter/core/impl
- Files:
-
- 1 added
- 2 modified
-
SabotterAsyncTwitter.java (added)
-
SabotterImpl.java (modified) (9 diffs)
-
TwitterAdapterWrapper.java (modified) (5 diffs)
Legend:
- Unmodified
- Added
- Removed
-
lang/java/sabotter/trunk/src/jp/xet/eclipse/sabotter/core/impl/SabotterImpl.java
r14933 r15041 11 11 import org.eclipse.core.net.proxy.IProxyService; 12 12 13 import twitter4j.AsyncTwitter;14 13 import twitter4j.TwitterException; 15 14 … … 18 17 * 19 18 * @author Ewigkeit 19 * 20 20 * @see twitter4j.AsyncTwitter 21 21 */ … … 24 24 private static final String TWITTER_SOURCE = "sabotter"; 25 25 26 private AsyncTwitter twitter;26 private SabotterAsyncTwitter twitter; 27 27 28 28 … … 48 48 } 49 49 50 this.twitter = new AsyncTwitter(id, password); 50 this.twitter = new SabotterAsyncTwitter(id, password); 51 this.twitter.verifyCredentials(); 51 52 this.twitter.setSource(TWITTER_SOURCE); 52 53 } … … 60 61 */ 61 62 public SabotterImpl(String id, String password, String baseURL) { 62 this.twitter = newAsyncTwitter(id, password, baseURL);63 this.twitter.forceUsePost(true);63 // TODO 使っていない? this.twitter = new SabotterAsyncTwitter(id, password, baseURL); 64 // this.twitter.forceUsePost(true); 64 65 } 65 66 … … 80 81 */ 81 82 public final void getFriendsTimelineAsync(SabotterListener listener) { 83 // this.twitter.verifyCredentials(); 82 84 this.twitter.getFriendsTimelineAsync(new TwitterAdapterWrapper(listener)); 83 85 } … … 107 109 /** 108 110 * Override method. 111 * 109 112 * @see jp.xet.eclipse.sabotter.core.Sabotter#getRepliesAsync(jp.xet.eclipse.sabotter.core.SabotterListener) 110 113 */ … … 115 118 /** 116 119 * Override method. 120 * 117 121 * @see jp.xet.eclipse.sabotter.core.Sabotter#getDirectMessagesAsync(jp.xet.eclipse.sabotter.core.SabotterListener) 118 122 */ … … 123 127 /** 124 128 * Override method. 129 * 125 130 * @see jp.xet.eclipse.sabotter.core.Sabotter#changeAccount(java.lang.String, java.lang.String) 126 131 */ -
lang/java/sabotter/trunk/src/jp/xet/eclipse/sabotter/core/impl/TwitterAdapterWrapper.java
r12970 r15041 4 4 import java.util.List; 5 5 6 import jp.xet.eclipse.sabotter.SabotterPlugin; 6 7 import jp.xet.eclipse.sabotter.core.SabotterEntry; 7 8 import jp.xet.eclipse.sabotter.core.SabotterListener; … … 17 18 * 18 19 * @author Ewigkeit 20 * 19 21 * @see twitter4j.TwitterAdapter 20 22 */ … … 51 53 /** 52 54 * Override method. 55 * 53 56 * @see twitter4j.TwitterAdapter#gotDirectMessages(java.util.List) 54 57 */ … … 66 69 /** 67 70 * Override method. 71 * 68 72 * @see twitter4j.TwitterAdapter#gotReplies(java.util.List) 69 73 */ … … 86 90 @Override 87 91 public void onException(TwitterException ex, int method) { 92 if (ex.getStatusCode() == 400) { // タイムライン取得制限 93 SabotterPlugin.handleException(ex, SabotterPlugin.DIALOG, "APIタイム制限です"); 94 } 95 ex.printStackTrace(); 88 96 this.listener.onException(new SabotterException(ex), method); 89 97 }
![(please configure the [header_logo] section in trac.ini)](/share/chrome/site/your_project_logo.png)