Skip to content
This repository has been archived by the owner on Nov 19, 2021. It is now read-only.

Commit

Permalink
TFJ-157 getUserTimeline should be invocable from unauthenticated Twit…
Browse files Browse the repository at this point in the history
…ter instances

git-svn-id: http://yusuke.homeip.net/svn/twitter4j/trunk@314 117b7e0d-5933-0410-9d29-ab41bb01d86b
  • Loading branch information
yusuke committed May 28, 2009
1 parent a3a7725 commit c73947c
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
10 changes: 5 additions & 5 deletions src/main/java/twitter4j/Twitter.java
Original file line number Diff line number Diff line change
Expand Up @@ -693,7 +693,7 @@ public List<Status> getFriendsTimeline(String id, long sinceId) throws TwitterEx
public List<Status> getUserTimeline(String id, int count
, Date since) throws TwitterException {
return Status.constructStatuses(get(baseURL + "statuses/user_timeline/" + id + ".xml",
"since", format.format(since), "count", String.valueOf(count), true), this);
"since", format.format(since), "count", String.valueOf(count), http.isAuthenticationEnabled()), this);
}

/**
Expand Down Expand Up @@ -727,7 +727,7 @@ public List<Status> getUserTimeline(String id, int count,
public List<Status> getUserTimeline(String id, Paging paging)
throws TwitterException {
return Status.constructStatuses(get(baseURL + "statuses/user_timeline/" + id + ".xml",
null, paging, true), this);
null, paging, http.isAuthenticationEnabled()), this);
}

/**
Expand All @@ -743,7 +743,7 @@ public List<Status> getUserTimeline(String id, Paging paging)
*/
public List<Status> getUserTimeline(String id, Date since) throws TwitterException {
return Status.constructStatuses(get(baseURL + "statuses/user_timeline/" + id + ".xml",
"since", format.format(since), true), this);
"since", format.format(since), http.isAuthenticationEnabled()), this);
}

/**
Expand All @@ -760,7 +760,7 @@ public List<Status> getUserTimeline(String id, Date since) throws TwitterExcepti
public List<Status> getUserTimeline(String id, int count) throws
TwitterException {
return Status.constructStatuses(get(baseURL + "statuses/user_timeline/" + id + ".xml",
"count", String.valueOf(count), true), this);
"count", String.valueOf(count), http.isAuthenticationEnabled()), this);
}

/**
Expand Down Expand Up @@ -805,7 +805,7 @@ public List<Status> getUserTimeline(int count, long sinceId) throws TwitterExcep
* @see <a href="http://apiwiki.twitter.com/Twitter-REST-API-Method%3A-statuses-friends_timeline">Twitter API Wiki / Twitter REST API Method: statuses friends_timeline</a>
*/
public List<Status> getUserTimeline(String id) throws TwitterException {
return Status.constructStatuses(get(baseURL + "statuses/user_timeline/" + id + ".xml", true), this);
return Status.constructStatuses(get(baseURL + "statuses/user_timeline/" + id + ".xml", http.isAuthenticationEnabled()), this);
}

/**
Expand Down
2 changes: 1 addition & 1 deletion src/test/java/twitter4j/TwitterTestUnit.java
Original file line number Diff line number Diff line change
Expand Up @@ -168,7 +168,7 @@ public void testGetUserTimeline_Show() throws Exception{
List<Status> statuses;
statuses = twitterAPI1.getUserTimeline();
assertTrue("size", 0 < statuses.size());
statuses = twitterAPI2.getUserTimeline(id1);
statuses = unauthenticated.getUserTimeline(id1);
assertTrue("size", 0 < statuses.size());
statuses = twitterAPI1.getUserTimeline(new Paging(999383469l));
assertTrue("size", 0 < statuses.size());
Expand Down

0 comments on commit c73947c

Please sign in to comment.