Permalink
Browse files

Merge branch 'master' of https://github.com/twitter/twitter4j

  • Loading branch information...
2 parents 1c24b0b + 90adbc8 commit 9f3943821842b04c535a5b0f5d7efce1f6ba2955 tk committed Nov 16, 2011
Showing with 854 additions and 661 deletions.
  1. +2 −13 package.sh
  2. +1 −1 pom.xml
  3. +2 −1 readme.txt
  4. +2 −2 twitter4j-appengine/pom.xml
  5. +1 −1 twitter4j-appengine/src/main/java/twitter4j/VersionAppEngine.java
  6. +2 −2 twitter4j-appengine/src/main/java/twitter4j/internal/json/z_T4JInternalLazyFactory.java
  7. +2 −2 twitter4j-async/pom.xml
  8. +36 −55 twitter4j-async/src/main/java/twitter4j/AsyncTwitterImpl.java
  9. +2 −9 twitter4j-async/src/main/java/twitter4j/TwitterAdapter.java
  10. +2 −10 twitter4j-async/src/main/java/twitter4j/TwitterListener.java
  11. +2 −3 twitter4j-async/src/main/java/twitter4j/TwitterMethod.java
  12. +1 −1 twitter4j-async/src/main/java/twitter4j/VersionAsync.java
  13. +23 −0 twitter4j-async/src/main/java/twitter4j/api/FavoriteMethodsAsync.java
  14. +2 −2 twitter4j-async/src/main/java/twitter4j/api/StatusMethodsAsync.java
  15. +2 −29 twitter4j-async/src/main/java/twitter4j/api/TrendsMethodsAsync.java
  16. +1 −5 twitter4j-async/src/test/java/twitter4j/AsyncTwitterTest.java
  17. +1 −1 twitter4j-core/pom.xml
  18. +54 −0 twitter4j-core/src/main/java/twitter4j/EntitySupport.java
  19. +5 −1 twitter4j-core/src/main/java/twitter4j/Query.java
  20. +2 −33 twitter4j-core/src/main/java/twitter4j/Status.java
  21. +90 −9 twitter4j-core/src/main/java/twitter4j/StatusUpdate.java
  22. +2 −1 twitter4j-core/src/main/java/twitter4j/Tweet.java
  23. +41 −32 twitter4j-core/src/main/java/twitter4j/TwitterImpl.java
  24. +0 −3 twitter4j-core/src/main/java/twitter4j/TwitterResponse.java
  25. +1 −1 twitter4j-core/src/main/java/twitter4j/Version.java
  26. +28 −0 twitter4j-core/src/main/java/twitter4j/api/FavoriteMethods.java
  27. +3 −8 twitter4j-core/src/main/java/twitter4j/api/StatusMethods.java
  28. +2 −35 twitter4j-core/src/main/java/twitter4j/api/TrendsMethods.java
  29. +2 −0 twitter4j-core/src/main/java/twitter4j/conf/Configuration.java
  30. +27 −9 twitter4j-core/src/main/java/twitter4j/conf/ConfigurationBase.java
  31. +4 −1 twitter4j-core/src/main/java/twitter4j/conf/PropertyConfiguration.java
  32. +2 −3 twitter4j-core/src/main/java/twitter4j/internal/http/HttpClientBase.java
  33. +36 −27 twitter4j-core/src/main/java/twitter4j/internal/json/StatusJSONImpl.java
  34. +88 −0 twitter4j-core/src/main/java/twitter4j/internal/json/TweetJSONImpl.java
  35. +17 −0 twitter4j-core/src/main/java/twitter4j/internal/json/z_T4JInternalFactory.java
  36. +6 −1 twitter4j-core/src/main/java/twitter4j/internal/json/z_T4JInternalJSONImplFactory.java
  37. +3 −3 twitter4j-core/src/test/java/twitter4j/HelpMethodsTest.java
  38. +10 −43 twitter4j-core/src/test/java/twitter4j/SearchAPITest.java
  39. +33 −21 twitter4j-core/src/test/java/twitter4j/StatusMethodsTest.java
  40. +6 −22 twitter4j-core/src/test/java/twitter4j/conf/ConfigurationTest.java
  41. +1 −1 twitter4j-examples/bin/account/getAccountSettings.sh
  42. +1 −1 twitter4j-examples/bin/account/getAccountTotals.sh
  43. +1 −1 twitter4j-examples/bin/account/getRateLimitStatus.sh
  44. +1 −1 twitter4j-examples/bin/account/updateProfile.sh
  45. +1 −1 twitter4j-examples/bin/account/updateProfileBackgroundImage.sh
  46. +1 −1 twitter4j-examples/bin/account/updateProfileColors.sh
  47. +1 −1 twitter4j-examples/bin/account/updateProfileImage.sh
  48. +1 −1 twitter4j-examples/bin/account/verifyCredentials.sh
  49. +1 −1 twitter4j-examples/bin/async/asyncUpdate.sh
  50. +1 −1 twitter4j-examples/bin/block/createBlock.sh
  51. +1 −1 twitter4j-examples/bin/block/destroyBlock.sh
  52. +1 −1 twitter4j-examples/bin/block/existsBlock.sh
  53. +1 −1 twitter4j-examples/bin/block/getBlockingUsers.sh
  54. +1 −1 twitter4j-examples/bin/block/getBlockingUsersIDs.sh
  55. +1 −1 twitter4j-examples/bin/directmessage/destroyDirectMessage.sh
  56. +1 −1 twitter4j-examples/bin/directmessage/getDirectMessages.sh
  57. +1 −1 twitter4j-examples/bin/directmessage/getSentDirectMessages.sh
  58. +1 −1 twitter4j-examples/bin/directmessage/sendDirectMessage.sh
  59. +1 −1 twitter4j-examples/bin/directmessage/showDirectMessage.sh
  60. +1 −1 twitter4j-examples/bin/favorite/createFavorite.sh
  61. +1 −1 twitter4j-examples/bin/favorite/destroyFavorite.sh
  62. +1 −1 twitter4j-examples/bin/favorite/getFavorites.sh
  63. +1 −1 twitter4j-examples/bin/friendsandfollowers/getFollowersIDs.sh
  64. +1 −1 twitter4j-examples/bin/friendsandfollowers/getFriendsIDs.sh
  65. +1 −1 twitter4j-examples/bin/friendship/createFriendship.sh
  66. +1 −1 twitter4j-examples/bin/friendship/destroyFriendship.sh
  67. +1 −1 twitter4j-examples/bin/friendship/existsFriendship.sh
  68. +1 −1 twitter4j-examples/bin/friendship/getIncomingFriendships.sh
  69. +1 −1 twitter4j-examples/bin/friendship/getOutgoingFriendships.sh
  70. +1 −1 twitter4j-examples/bin/friendship/lookupFriendships.sh
  71. +1 −1 twitter4j-examples/bin/friendship/showFriendship.sh
  72. +1 −1 twitter4j-examples/bin/friendship/updateFriendship.sh
  73. +1 −1 twitter4j-examples/bin/geo/createPlace.sh
  74. +1 −1 twitter4j-examples/bin/geo/getGeoDetails.sh
  75. +1 −1 twitter4j-examples/bin/geo/getSimilarPlaces.sh
  76. +1 −1 twitter4j-examples/bin/geo/reverseGeoCode.sh
  77. +1 −1 twitter4j-examples/bin/geo/searchPlaces.sh
  78. +1 −1 twitter4j-examples/bin/getAccessToken.sh
  79. +1 −1 twitter4j-examples/bin/help/test.sh
  80. +1 −1 twitter4j-examples/bin/json/loadRawJSON.sh
  81. +1 −1 twitter4j-examples/bin/json/saveRawJSON.sh
  82. +1 −1 twitter4j-examples/bin/legal/getPrivacyPolicy.sh
  83. +1 −1 twitter4j-examples/bin/legal/getTermsOfService.sh
  84. +1 −1 twitter4j-examples/bin/list/createUserList.sh
  85. +1 −1 twitter4j-examples/bin/list/destroyUserList.sh
  86. +1 −1 twitter4j-examples/bin/list/getAllUserLists.sh
  87. +1 −1 twitter4j-examples/bin/list/getUserListMemberships.sh
  88. +1 −1 twitter4j-examples/bin/list/getUserListStatuses.sh
  89. +1 −1 twitter4j-examples/bin/list/getUserListSubscriptions.sh
  90. +1 −1 twitter4j-examples/bin/list/getUserLists.sh
  91. +1 −1 twitter4j-examples/bin/list/showUserList.sh
  92. +1 −1 twitter4j-examples/bin/list/updateUserList.sh
  93. +1 −1 twitter4j-examples/bin/listmembers/addUserListMember.sh
  94. +1 −1 twitter4j-examples/bin/listmembers/addUserListMembers.sh
  95. +1 −1 twitter4j-examples/bin/listmembers/deleteUserListMember.sh
  96. +1 −1 twitter4j-examples/bin/listmembers/getUserListMembers.sh
  97. +1 −1 twitter4j-examples/bin/listmembers/showUserListMembership.sh
  98. +1 −1 twitter4j-examples/bin/listsubscribers/createUserListSubscription.sh
  99. +1 −1 twitter4j-examples/bin/listsubscribers/destroyUserListSubscription.sh
  100. +1 −1 twitter4j-examples/bin/listsubscribers/getUserListSubscribers.sh
  101. +1 −1 twitter4j-examples/bin/listsubscribers/showUserListSubscription.sh
  102. +1 −1 twitter4j-examples/bin/media/imgLyImageUpload.sh
  103. +1 −1 twitter4j-examples/bin/media/tweetPhotoImageUpload.sh
  104. +1 −1 twitter4j-examples/bin/media/twippleImageUpload.sh
  105. +1 −1 twitter4j-examples/bin/media/twitpicImageUpload.sh
  106. +1 −1 twitter4j-examples/bin/media/yFrogImageUpload.sh
  107. +1 −1 twitter4j-examples/bin/notification/disableNotification.sh
  108. +1 −1 twitter4j-examples/bin/notification/enableNotification.sh
  109. +1 −1 twitter4j-examples/bin/savedsearches/createSavedSearch.sh
  110. +1 −1 twitter4j-examples/bin/savedsearches/destroySavedSearch.sh
  111. +1 −1 twitter4j-examples/bin/savedsearches/getSavedSearches.sh
  112. +1 −1 twitter4j-examples/bin/savedsearches/showSavedSearch.sh
  113. +1 −1 twitter4j-examples/bin/search/searchTweets.sh
  114. +1 −1 twitter4j-examples/bin/spamreporting/reportSpam.sh
  115. +1 −1 twitter4j-examples/bin/stream/printFilterStream.sh
  116. +1 −1 twitter4j-examples/bin/stream/printFirehoseStream.sh
  117. +1 −1 twitter4j-examples/bin/stream/printLinksStream.sh
  118. +1 −1 twitter4j-examples/bin/stream/printRetweetStream.sh
  119. +1 −1 twitter4j-examples/bin/stream/printSampleStream.sh
  120. +1 −1 twitter4j-examples/bin/stream/printSiteStreams.sh
  121. +1 −1 twitter4j-examples/bin/stream/printUserStream.sh
  122. +1 −1 twitter4j-examples/bin/timeline/getFriendsTimeline.sh
  123. +1 −1 twitter4j-examples/bin/timeline/getHomeTimeline.sh
  124. +1 −1 twitter4j-examples/bin/timeline/getMentions.sh
  125. +1 −1 twitter4j-examples/bin/timeline/getPublicTimeline.sh
  126. +1 −1 twitter4j-examples/bin/timeline/getRetweetedByMe.sh
  127. +1 −1 twitter4j-examples/bin/timeline/getRetweetedByUser.sh
  128. +1 −1 twitter4j-examples/bin/timeline/getRetweetedToMe.sh
  129. +1 −1 twitter4j-examples/bin/timeline/getRetweetedToUser.sh
  130. +1 −1 twitter4j-examples/bin/timeline/getRetweetsOfMe.sh
  131. +1 −1 twitter4j-examples/bin/timeline/getUserTimeline.sh
  132. +1 −1 twitter4j-examples/bin/trends/getAvailableTrends.sh
  133. +0 −9 twitter4j-examples/bin/trends/getCurrentTrends.cmd
  134. +0 −7 twitter4j-examples/bin/trends/getCurrentTrends.sh
  135. +1 −1 twitter4j-examples/bin/trends/getDailyTrends.sh
  136. +1 −1 twitter4j-examples/bin/trends/getLocationTrends.sh
  137. +0 −9 twitter4j-examples/bin/trends/getTrends.cmd
  138. +0 −7 twitter4j-examples/bin/trends/getTrends.sh
  139. +1 −1 twitter4j-examples/bin/trends/getWeeklyTrends.sh
  140. +1 −1 twitter4j-examples/bin/tweets/destroyStatus.sh
  141. +1 −1 twitter4j-examples/bin/tweets/getRetweetedBy.sh
  142. +1 −1 twitter4j-examples/bin/tweets/getRetweetedByIds.sh
  143. +1 −1 twitter4j-examples/bin/tweets/getRetweets.sh
  144. +1 −1 twitter4j-examples/bin/tweets/retweetStatus.sh
  145. +1 −1 twitter4j-examples/bin/tweets/showStatus.sh
  146. +1 −1 twitter4j-examples/bin/tweets/updateStatus.sh
  147. +1 −1 twitter4j-examples/bin/user/getFollowersStatuses.sh
  148. +1 −1 twitter4j-examples/bin/user/getFriendsStatuses.sh
  149. +1 −1 twitter4j-examples/bin/user/getMemberSuggestions.sh
  150. +1 −1 twitter4j-examples/bin/user/getProfileImage.sh
  151. +1 −1 twitter4j-examples/bin/user/getSuggestedUserCategories.sh
  152. +1 −1 twitter4j-examples/bin/user/getUserSuggestions.sh
  153. +1 −1 twitter4j-examples/bin/user/lookupUsers.sh
  154. +1 −1 twitter4j-examples/bin/user/searchUsers.sh
  155. +1 −1 twitter4j-examples/bin/user/showUser.sh
  156. +5 −5 twitter4j-examples/pom.xml
  157. +0 −53 twitter4j-examples/src/main/java/twitter4j/examples/trends/GetCurrentTrends.java
  158. +0 −53 twitter4j-examples/src/main/java/twitter4j/examples/trends/GetTrends.java
  159. +2 −2 twitter4j-httpclient-support/pom.xml
  160. +1 −1 twitter4j-httpclient-support/src/main/java/twitter4j/internal/http/alternative/Version.java
  161. +2 −2 twitter4j-media-support/pom.xml
  162. +56 −4 twitter4j-media-support/src/main/java/twitter4j/media/AbstractImageUploadImpl.java
  163. +7 −3 twitter4j-media-support/src/main/java/twitter4j/media/ImageUploadFactory.java
  164. +1 −0 twitter4j-media-support/src/main/java/twitter4j/media/MediaProvider.java
  165. +83 −0 twitter4j-media-support/src/main/java/twitter4j/media/TwitterUpload.java
  166. +1 −1 twitter4j-media-support/src/main/java/twitter4j/media/Version.java
  167. +14 −0 twitter4j-media-support/src/test/java/twitter4j/media/MediaUploadTest.java
  168. +3 −3 twitter4j-stream/pom.xml
  169. +1 −1 twitter4j-stream/src/main/java/twitter4j/VersionStream.java
  170. +21 −0 twitter4j-stream/src/test/java/twitter4j/UserStreamTest.java
View
@@ -1,19 +1,8 @@
+#!/bin/sh
LANG=C
export HASH=`git log|head -n 1|sed "s/^commit //g"`
-mkdir /tmp/t4jbuild
-cp -r ./* /tmp/t4jbuild/
-cd /tmp/t4jbuild/
-rm twitter4j-core/src/test/resources/test.properties
-rm twitter4j-core/src/test/resources/xauth-test.properties
-rm twitter4j-httpclient-support/src/test/resources/twitter4j.properties
-rm twitter4j-media-support/src/test/resources/twitter4j.properties
-rm twitter4j-async/src/test/resources/test.properties
-rm twitter4j-stream/src/test/resources/test.properties
-rm twitter4j-stream/src/test/resources/sitestream-test.properties
-rm twitter4j-appengine/src/test/resources/twitter4j.properties
-
sed -i '' "s/<url>http:\/\/oss.sonatype.org\/service\/local\/staging\/deploy\/maven2\//<url>file:\/Users\/yusukey\/maven2\//g" pom.xml
sed -i '' "s/<url>http:\/\/oss.sonatype.org\/service\/local\/staging\/deploy\/maven2\//<url>file:\/Users\/yusukey\/maven2\//g" twitter4j-core/pom.xml
sed -i '' "s/<url>http:\/\/oss.sonatype.org\/service\/local\/staging\/deploy\/maven2\//<url>file:\/Users\/yusukey\/maven2\//g" twitter4j-appengine/pom.xml
@@ -115,6 +104,7 @@ mkdir $DIR/twitter4j-appengine/javadoc/
unzip twitter4j-appengine/target/twitter4j-appengine-$1-javadoc.jar -d $DIR/twitter4j-appengine/javadoc/
cp twitter4j-appengine/target/twitter4j-appengine-$1-javadoc.jar -d $DIR/twitter4j-appengine/
cp twitter4j-appengine/target/twitter4j-appengine-$1-sources.jar -d $DIR/twitter4j-appengine/
+cp twitter4j-appengine/target/twitter4j-appengine-$1.jar -d $DIR/twitter4j-appengine/
mkdir $DIR/lib
cp readme-libs.txt $DIR/lib
@@ -123,7 +113,6 @@ cp twitter4j-media-support/target/twitter4j-media-support-$1.jar $DIR/lib
cp twitter4j-examples/target/twitter4j-examples-$1.jar $DIR/lib
cp twitter4j-async/target/twitter4j-async-$1.jar $DIR/lib
cp twitter4j-stream/target/twitter4j-stream-$1.jar $DIR/lib
-cp twitter4j-appengine/target/twitter4j-appengine-$1.jar $DIR/lib
cd $DIR/
find . -name ".svn" -print -exec rm -rf {} ";"
View
@@ -2,7 +2,7 @@
<modelVersion>4.0.0</modelVersion>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j</artifactId>
- <version>2.2.5-SNAPSHOT</version>
+ <version>2.2.6-SNAPSHOT</version>
<packaging>pom</packaging>
<name>twitter4j</name>
<description>A Java library for the Twitter API</description>
View
@@ -41,11 +41,12 @@ Perry Sakkaris <psakkaris at gmail.com>
Roberto Estrada <robestradac at gmail.com>
Roy Reshef <royreshef at gmail.com> @tsipo
Rui Silva
+Sam Pullara <sam at sampullara.com> @sampullara
Steve Lhomme <slhomme at matroska.org> @robux4
Rémy Rakic <remy.rakic at gmail.com> @lqd
Takao Nakaguchi <takao.nakaguchi at gmail.com> @takawitter
Tomohisa Igarashi <tm.igarashi at gmail.com>
Will Glozer <will at glozer.net> @ar3te
William Morgan <william at twitter.com> @wm
withgod <noname at withgod.jp> @withgod
-Yusuke Yamamoto <yusuke at mac.com> @yusukey
+Yusuke Yamamoto <yusuke at mac.com> @yusuke
@@ -3,7 +3,7 @@
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-appengine</artifactId>
- <version>2.2.5-SNAPSHOT</version>
+ <version>2.2.6-SNAPSHOT</version>
<packaging>jar</packaging>
<name>twitter4j-appengine</name>
<description>A Java library for the Twitter API</description>
@@ -96,7 +96,7 @@
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
- <version>2.2.5-SNAPSHOT</version>
+ <version>2.2.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
@@ -21,7 +21,7 @@
* @since Twitter4J 2.2.4
*/
public final class VersionAppEngine {
- private static final String VERSION = "2.2.5-SNAPSHOT";
+ private static final String VERSION = "2.2.6-SNAPSHOT";
private static final String TITLE = "Twitter4J App Engine Support";
private VersionAppEngine() {
@@ -223,8 +223,8 @@ public Place createPlace(HttpResponse res) throws TwitterException {
};
}
- public ResponseList<Place> createEmptyPlaceList() {
- return new ResponseListImpl<Place>(0, null);
+ public <T> ResponseList<T> createEmptyResponseList() {
+ return new ResponseListImpl<T>(0, null);
}
public SimilarPlaces createSimilarPlaces(HttpResponse res) throws TwitterException {
View
@@ -3,7 +3,7 @@
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-async</artifactId>
- <version>2.2.5-SNAPSHOT</version>
+ <version>2.2.6-SNAPSHOT</version>
<packaging>jar</packaging>
<name>twitter4j-async</name>
<description>A Java library for the Twitter API</description>
@@ -96,7 +96,7 @@
<dependency>
<groupId>org.twitter4j</groupId>
<artifactId>twitter4j-core</artifactId>
- <version>2.2.5-SNAPSHOT</version>
+ <version>2.2.6-SNAPSHOT</version>
</dependency>
<dependency>
<groupId>junit</groupId>
@@ -1,5 +1,6 @@
/*
- * Copyright 2007 Yusuke Yamamoto
+ * Copyright (C) 2007 Yusuke Yamamoto
+ * Copyright (C) 2011 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -81,60 +82,6 @@ public void invoke(List<TwitterListener> listeners) throws TwitterException {
/**
* {@inheritDoc}
*/
- public void getTrends() {
- getDispatcher().invokeLater(new AsyncTask(TRENDS, listeners) {
- public void invoke(List<TwitterListener> listeners) throws
- TwitterException {
- Trends trends = twitter.getTrends();
- for (TwitterListener listener : listeners) {
- try {
- listener.gotTrends(trends);
- } catch (Exception ignore) {
- }
- }
- }
- });
- }
-
- /**
- * {@inheritDoc}
- */
- public void getCurrentTrends() {
- getDispatcher().invokeLater(new AsyncTask(CURRENT_TRENDS, listeners) {
- public void invoke(List<TwitterListener> listeners) throws
- TwitterException {
- Trends trends = twitter.getCurrentTrends();
- for (TwitterListener listener : listeners) {
- try {
- listener.gotCurrentTrends(trends);
- } catch (Exception ignore) {
- }
- }
- }
- });
- }
-
- /**
- * {@inheritDoc}
- */
- public void getCurrentTrends(final boolean excludeHashTags) {
- getDispatcher().invokeLater(new AsyncTask(CURRENT_TRENDS, listeners) {
- public void invoke(List<TwitterListener> listeners) throws
- TwitterException {
- Trends trends = twitter.getCurrentTrends(excludeHashTags);
- for (TwitterListener listener : listeners) {
- try {
- listener.gotCurrentTrends(trends);
- } catch (Exception ignore) {
- }
- }
- }
- });
- }
-
- /**
- * {@inheritDoc}
- */
public void getDailyTrends() {
getDispatcher().invokeLater(new AsyncTask(DAILY_TRENDS, listeners) {
public void invoke(List<TwitterListener> listeners) throws
@@ -2277,6 +2224,40 @@ public void invoke(List<TwitterListener> listeners) throws TwitterException {
/**
* {@inheritDoc}
*/
+ public void getFavorites(final Paging paging) {
+ getDispatcher().invokeLater(new AsyncTask(FAVORITES, listeners) {
+ public void invoke(List<TwitterListener> listeners) throws TwitterException {
+ ResponseList<Status> statuses = twitter.getFavorites(paging);
+ for (TwitterListener listener : listeners) {
+ try {
+ listener.gotFavorites(statuses);
+ } catch (Exception ignore) {
+ }
+ }
+ }
+ });
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void getFavorites(final String id, final Paging paging) {
+ getDispatcher().invokeLater(new AsyncTask(FAVORITES, listeners) {
+ public void invoke(List<TwitterListener> listeners) throws TwitterException {
+ ResponseList<Status> statuses = twitter.getFavorites(id, paging);
+ for (TwitterListener listener : listeners) {
+ try {
+ listener.gotFavorites(statuses);
+ } catch (Exception ignore) {
+ }
+ }
+ }
+ });
+ }
+
+ /**
+ * {@inheritDoc}
+ */
public void createFavorite(final long id) {
getDispatcher().invokeLater(new AsyncTask(CREATE_FAVORITE, listeners) {
public void invoke(List<TwitterListener> listeners) throws TwitterException {
@@ -1,5 +1,6 @@
/*
- * Copyright 2007 Yusuke Yamamoto
+ * Copyright (C) 2007 Yusuke Yamamoto
+ * Copyright (C) 2011 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +19,6 @@
import twitter4j.api.HelpMethods;
-import java.util.List;
-
/**
* A handy adapter of TwitterListener.
*
@@ -38,12 +37,6 @@ public void searched(QueryResult result) {
/**
* @since Twitter4J 2.0.2
*/
- public void gotTrends(Trends trends) {
- }
-
- /**
- * @since Twitter4J 2.0.2
- */
public void gotCurrentTrends(Trends trends) {
}
@@ -1,5 +1,6 @@
/*
- * Copyright 2007 Yusuke Yamamoto
+ * Copyright (C) 2007 Yusuke Yamamoto
+ * Copyright (C) 2011 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -18,8 +19,6 @@
import twitter4j.api.HelpMethods;
-import java.util.List;
-
/**
* A listner for receiving asynchronous responses from Twitter Async APIs.
*
@@ -34,11 +33,6 @@
/**
* @since Twitter4J 2.0.2
*/
- void gotTrends(Trends trends);
-
- /**
- * @since Twitter4J 2.0.2
- */
void gotCurrentTrends(Trends trends);
/**
@@ -482,8 +476,6 @@
/*Search API Methods*/
TwitterMethod SEARCH = TwitterMethod.SEARCH;
- TwitterMethod TRENDS = TwitterMethod.TRENDS;
- TwitterMethod CURRENT_TRENDS = TwitterMethod.CURRENT_TRENDS;
TwitterMethod DAILY_TRENDS = TwitterMethod.DAILY_TRENDS;
TwitterMethod WEEKLY_TRENDS = TwitterMethod.WEEKLY_TRENDS;
@@ -1,5 +1,6 @@
/*
- * Copyright 2007 Yusuke Yamamoto
+ * Copyright (C) 2007 Yusuke Yamamoto
+ * Copyright (C) 2011 Twitter, Inc.
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
@@ -78,8 +79,6 @@ private Object readResolve() throws ObjectStreamException {
/*Search API Methods*/
public static final TwitterMethod SEARCH = getInstance("SEARCH");
- public static final TwitterMethod TRENDS = new TwitterMethod("TRENDS");
- public static final TwitterMethod CURRENT_TRENDS = new TwitterMethod("CURRENT_TRENDS");
public static final TwitterMethod DAILY_TRENDS = new TwitterMethod("DAILY_TRENDS");
public static final TwitterMethod WEEKLY_TRENDS = new TwitterMethod("WEEKLY_TRENDS");
@@ -20,7 +20,7 @@
* @author Yusuke Yamamoto - yusuke at mac.com
*/
public final class VersionAsync {
- private static final String VERSION = "2.2.5-SNAPSHOT";
+ private static final String VERSION = "2.2.6-SNAPSHOT";
private static final String TITLE = "Twitter4J Async API";
private VersionAsync() {
@@ -16,6 +16,8 @@
package twitter4j.api;
+import twitter4j.Paging;
+
/**
* @author Joern Huxhorn - jhuxhorn at googlemail.com
*/
@@ -61,6 +63,27 @@
void getFavorites(String id, int page);
/**
+ * Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
+ * <br>This method calls http://api.twitter.com/1/favorites.json
+ *
+ * @param paging controls pagination. Supports sinceId and page parameters.
+ * @see <a href="https://dev.twitter.com/docs/api/1/get/favorites">GET favorites | Twitter Developers</a>
+ * @since Twitter4J 2.2.5
+ */
+ void getFavorites(Paging paging);
+
+ /**
+ * Returns the 20 most recent favorite statuses for the authenticating user or user specified by the ID parameter in the requested format.
+ * <br>This method calls http://api.twitter.com/1/favorites/[id].json
+ *
+ * @param id the ID or screen name of the user for whom to request a list of favorite statuses
+ * @param paging controls pagination. Supports sinceId and page parameters.
+ * @see <a href="https://dev.twitter.com/docs/api/1/get/favorites">GET favorites | Twitter Developers</a>
+ * @since Twitter4J 2.2.5
+ */
+ void getFavorites(String id, Paging paging);
+
+ /**
* Favorites the status specified in the ID parameter as the authenticating user. Returns the favorite status when successful.
* <br>This method calls http://api.twitter.com/1/favorites/create%C2%A0
*
@@ -48,11 +48,11 @@
* <br>Statuses over 140 characters will be forcibly truncated.
* <br>This method calls http://api.twitter.com/1/statuses/update
*
- * @param latestStatus the latest status to be updated.
+ * @param status the latest status to be updated.
* @see <a href="https://dev.twitter.com/docs/api/1/post/statuses/update">POST statuses/update | Twitter Developers</a>
* @since Twitter4J 2.1.1
*/
- void updateStatus(StatusUpdate latestStatus);
+ void updateStatus(StatusUpdate status);
/**
* Destroys the status specified by the required ID parameter.<br>
Oops, something went wrong.

0 comments on commit 9f39438

Please sign in to comment.