Skip to content

Commit

Permalink
TFJ-350 support include_rts
Browse files Browse the repository at this point in the history
following methods now supports include_rts
getPublicTimeline()
getFriendsTimeline()
getUserTimeline()
getMentions()
  • Loading branch information
yusuke committed Jul 17, 2010
1 parent 82e1a05 commit d336335
Showing 1 changed file with 12 additions and 8 deletions.
20 changes: 12 additions & 8 deletions twitter4j-core/src/main/java/twitter4j/Twitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -271,7 +271,7 @@ public List<Trends> getWeeklyTrends(Date date, boolean excludeHashTags) throws T
public ResponseList<Status> getPublicTimeline() throws
TwitterException {
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL() +
"statuses/public_timeline.json", auth));
"statuses/public_timeline.json?include_rts=true", auth));
}

/**
Expand All @@ -298,7 +298,7 @@ public ResponseList<Status> getHomeTimeline(Paging paging) throws
public ResponseList<Status> getFriendsTimeline() throws
TwitterException {
ensureAuthorizationEnabled();
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL() + "statuses/friends_timeline.json", auth));
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL() + "statuses/friends_timeline.json?include_rts=true", auth));
}

/**
Expand All @@ -308,7 +308,7 @@ public ResponseList<Status> getFriendsTimeline(Paging paging) throws
TwitterException {
ensureAuthorizationEnabled();
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL()
+ "statuses/friends_timeline.json", paging.asPostParameterArray(), auth));
+ "statuses/friends_timeline.json?include_rts=true", paging.asPostParameterArray(), auth));
}


Expand All @@ -319,7 +319,8 @@ public ResponseList<Status> getUserTimeline(String screenName, Paging paging)
throws TwitterException {
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL()
+ "statuses/user_timeline.json",
mergeParameters(new HttpParameter[]{new HttpParameter("screen_name", screenName)}
mergeParameters(new HttpParameter[]{new HttpParameter("screen_name", screenName)
, new HttpParameter("include_rts", "true")}
, paging.asPostParameterArray()), auth));
}

Expand All @@ -330,7 +331,8 @@ public ResponseList<Status> getUserTimeline(int userId, Paging paging)
throws TwitterException {
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL()
+ "statuses/user_timeline.json",
mergeParameters(new HttpParameter[]{new HttpParameter("user_id", userId)}
mergeParameters(new HttpParameter[]{new HttpParameter("user_id", userId)
, new HttpParameter("include_rts", "true")}
, paging.asPostParameterArray()), auth));
}

Expand Down Expand Up @@ -363,7 +365,9 @@ public ResponseList<Status> getUserTimeline(Paging paging) throws
TwitterException {
ensureAuthorizationEnabled();
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL() +
"statuses/user_timeline.json", paging.asPostParameterArray(), auth));
"statuses/user_timeline.json",
mergeParameters(new HttpParameter[]{new HttpParameter("include_rts", "true")}
, paging.asPostParameterArray()), auth));
}

/**
Expand All @@ -372,7 +376,7 @@ public ResponseList<Status> getUserTimeline(Paging paging) throws
public ResponseList<Status> getMentions() throws TwitterException {
ensureAuthorizationEnabled();
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL() +
"statuses/mentions.json", auth));
"statuses/mentions.json?include_rts=true", auth));
}

/**
Expand All @@ -381,7 +385,7 @@ public ResponseList<Status> getMentions() throws TwitterException {
public ResponseList<Status> getMentions(Paging paging) throws TwitterException {
ensureAuthorizationEnabled();
return StatusJSONImpl.createStatusList(http.get(conf.getRestBaseURL()
+ "statuses/mentions.json", paging.asPostParameterArray(), auth));
+ "statuses/mentions.json?include_rts=true", paging.asPostParameterArray(), auth));
}

/**
Expand Down

0 comments on commit d336335

Please sign in to comment.