Skip to content

Commit

Permalink
Merge branch 'master' of github-s17er:yusuke/twitter4j
Browse files Browse the repository at this point in the history
  • Loading branch information
s17er committed Jul 6, 2013
2 parents 97c040c + a014b8f commit d76d08a
Show file tree
Hide file tree
Showing 56 changed files with 1,902 additions and 923 deletions.
482 changes: 242 additions & 240 deletions powered-by-badge/powered-by-twitter4j.graffle

Large diffs are not rendered by default.

5 changes: 5 additions & 0 deletions readme.txt
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,13 @@ Bruno Torres Goyanna <bgoyanna at gmail.com> @bgoyanna
Ciaran Jessup <ciaranj at gmail.com> @ciaran_j
Cole Wen <wennnnke at gmail.com> @Pigwen
Dan Checkoway <dcheckoway at gmail.com>
Danaja Maldeniya <danajamkdt at gmail.com> @DanajaT
Daniel Huckaby <handlerexploit at gmail.com> @HandlerExploit
Dong Wang <dong at twitter.com> @dongwang218
Eric Jensen <ej at twitter.com> @ej
Fiaz Hossain <fiaz at twitter.com> @fiazhossain
Gonçalo Silva <goncalossilva at gmail.com> @goncalossilva
Hiroki Takemoto <pompopo at gmail.com> @pompopo
Hiroshi Sugimori <mamamadata at gmail.com> @ham1975
Hitoshi Kunimatsu <hkhumanoid at gmail.com>
JJ Kelley <jjthemachine at gmail.com> @jjthemachine
Expand All @@ -48,10 +51,12 @@ marr-masaaki <marr fiveflavors at gmail.com> @marr
matsumo <matsumo at ce.ns0.it>
Max Penet <m at qbits.cc> @mpenet
Mocel <docel77 at gmail.com> @Mocel
MortyChoi <soapsign at gmail.com> @Soapsign
Myyk Seok <myyk.seok at gmail.com> @myyk
Naoya Hatayama <applepedlar at gmail.com> @ApplePedlar
Ngoc Dao <[email protected]> @ngocdaothanh
Nobutoshi Ogata <n-ogata at cnt.biglobe.co.jp> @nobu666
Norbert Bartels <n.bartels at phpmonkeys.de>
Nicolas Bouillon <nicolas at bouil.org>
Nicholas Dellamaggiore <nick.dellamaggiore at gmail.com> @nickdella
Perry Sakkaris <psakkaris at gmail.com>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ public MediaEntity[] getMediaEntities() {
return getTarget().getMediaEntities();
}

@Override
public SymbolEntity[] getSymbolEntities() {
return getTarget().getSymbolEntities();
}

@Override
public boolean equals(Object o) {
if (this == o) return true;
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -171,6 +171,24 @@ public boolean isFavorited() {
return getTarget().isFavorited();
}

/**
* Indicates approximately how many times this Tweet has been "favorited" by Twitter users.
* @return the favorite count
*/
public long getFavoriteCount() {
return getTarget().getFavoriteCount();
}

/**
* Test if the status is retweeted
*
* @return true if retweeted
* @since Twitter4J 3.0.4
*/
public boolean isRetweeted() {
return getTarget().isRetweeted();
}


/**
* Return the user associated with the status.<br>
Expand Down Expand Up @@ -247,6 +265,11 @@ public boolean isPossiblySensitive() {
return getTarget().isPossiblySensitive();
}

@Override
public String getIsoLanguageCode() {
return getTarget().getIsoLanguageCode();
}


/**
* Returns an array of user mentions in the tweet, or null if no users were mentioned.
Expand Down Expand Up @@ -290,6 +313,11 @@ public MediaEntity[] getMediaEntities() {
return getTarget().getMediaEntities();
}

@Override
public SymbolEntity[] getSymbolEntities() {
return getTarget().getSymbolEntities();
}

public RateLimitStatus getRateLimitStatus() {
return getTarget().getRateLimitStatus();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ public DirectMessage createDirectMessage(JSONObject json) throws TwitterExceptio
return new DirectMessageJSONImpl(json);
}

public Map<String ,RateLimitStatus> createRateLimitStatuses(HttpResponse res) throws TwitterException {
public Map<String, RateLimitStatus> createRateLimitStatuses(HttpResponse res) throws TwitterException {
return factory.createRateLimitStatuses(res);
}

Expand Down Expand Up @@ -235,10 +235,6 @@ public SimilarPlaces createSimilarPlaces(HttpResponse res) throws TwitterExcepti
return new LazySimilarPlaces(res, factory);
}

public RelatedResults createRelatedResults(HttpResponse res) throws TwitterException {
return new LazyRelatedResults(res, factory);
}

public TwitterAPIConfiguration createTwitterAPIConfiguration(HttpResponse res) throws TwitterException {
return new LazyTwitterAPIConfiguration(res, factory);
}
Expand Down
3 changes: 1 addition & 2 deletions twitter4j-async/src/main/java/twitter4j/AsyncTwitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public interface AsyncTwitter extends java.io.Serializable,
PlacesGeoResourcesAsync,
TrendsResourcesAsync,
SpamReportingResourceAsync,
HelpResourcesAsync,
UndocumentedResourcesAsync {
HelpResourcesAsync {

/**
* Adds twitter listener
Expand Down
58 changes: 25 additions & 33 deletions twitter4j-async/src/main/java/twitter4j/AsyncTwitterImpl.java
Original file line number Diff line number Diff line change
Expand Up @@ -2557,36 +2557,39 @@ public void invoke(List<TwitterListener> listeners) throws TwitterException {


/* Saved Searches Resources */

/**
* {@inheritDoc}
*/
@Override
public void getSavedSearches() {
getDispatcher().invokeLater(new AsyncTask(SAVED_SEARCHES, listeners) {
@Override
public void invoke(List<TwitterListener> listeners) throws TwitterException {
ResponseList<SavedSearch> savedSearches = twitter.getSavedSearches();
for (TwitterListener listener : listeners) {
try {
listener.gotSavedSearches(savedSearches); } catch (Exception ignore) {
}
getDispatcher().invokeLater(new AsyncTask(SAVED_SEARCHES, listeners) {
@Override
public void invoke(List<TwitterListener> listeners) throws TwitterException {
ResponseList<SavedSearch> savedSearches = twitter.getSavedSearches();
for (TwitterListener listener : listeners) {
try {
listener.gotSavedSearches(savedSearches);
} catch (Exception ignore) {
}
}
});
}
}
});
}

/**
* {@inheritDoc}
*/
@Override
public void showSavedSearch(final int id){
public void showSavedSearch(final int id) {
getDispatcher().invokeLater(new AsyncTask(SAVED_SEARCH, listeners) {
@Override
public void invoke(List<TwitterListener> listeners) throws TwitterException {
SavedSearch savedSearch = twitter.showSavedSearch(id);
for (TwitterListener listener : listeners) {
try {
listener.gotSavedSearch(savedSearch); } catch (Exception ignore) {
listener.gotSavedSearch(savedSearch);
} catch (Exception ignore) {
}
}
}
Expand All @@ -2597,14 +2600,15 @@ public void invoke(List<TwitterListener> listeners) throws TwitterException {
* {@inheritDoc}
*/
@Override
public void createSavedSearch(final String query){
public void createSavedSearch(final String query) {
getDispatcher().invokeLater(new AsyncTask(CREATE_SAVED_SEARCH, listeners) {
@Override
public void invoke(List<TwitterListener> listeners) throws TwitterException {
SavedSearch savedSearch = twitter.createSavedSearch(query);
for (TwitterListener listener : listeners) {
try {
listener.createdSavedSearch(savedSearch); } catch (Exception ignore) {
listener.createdSavedSearch(savedSearch);
} catch (Exception ignore) {
}
}
}
Expand All @@ -2615,21 +2619,23 @@ public void invoke(List<TwitterListener> listeners) throws TwitterException {
* {@inheritDoc}
*/
@Override
public void destroySavedSearch(final int id){
public void destroySavedSearch(final int id) {
getDispatcher().invokeLater(new AsyncTask(DESTROY_SAVED_SEARCH, listeners) {
@Override
public void invoke(List<TwitterListener> listeners) throws TwitterException {
SavedSearch savedSearch = twitter.destroySavedSearch(id);
for (TwitterListener listener : listeners) {
try {
listener.destroyedSavedSearch(savedSearch); } catch (Exception ignore) {
listener.destroyedSavedSearch(savedSearch);
} catch (Exception ignore) {
}
}
}
});
}

/* Places & Geo Resources */

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -2796,6 +2802,7 @@ public void invoke(List<TwitterListener> listeners) throws TwitterException {
}

/* Spam Reporting Resources */

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -2835,6 +2842,7 @@ public void invoke(List<TwitterListener> listeners) throws TwitterException {
}

/* Help Resources */

/**
* {@inheritDoc}
*/
Expand Down Expand Up @@ -2949,24 +2957,8 @@ public void invoke(List<TwitterListener> listeners) throws TwitterException {
});
}

/* Undocumented Resources */
@Override
public void getRelatedResults(final long statusId) {
getDispatcher().invokeLater(new AsyncTask(RELATED_RESULTS, listeners) {
@Override
void invoke(List<TwitterListener> listeners) throws TwitterException {
RelatedResults relatedResults = twitter.getRelatedResults(statusId);
for (TwitterListener listener : listeners) {
try {
listener.gotRelatedResults(relatedResults);
} catch (Exception ignore) {
}
}
}
});
}

// implementation for AsyncOAuthSupport

/**
* {@inheritDoc}
*/
Expand Down
Loading

0 comments on commit d76d08a

Please sign in to comment.