Changes for page TwitterGroovy
Last modified by Ludovic Dubost on 2010/02/11 15:14
From version 5.1
edited by Ludovic Dubost
on 2009/01/02 14:23
on 2009/01/02 14:23
Change comment:
There is no comment for this version
To version 4.1
edited by Ludovic Dubost
on 2008/12/31 10:01
on 2008/12/31 10:01
Change comment:
There is no comment for this version
Summary
-
Page properties (1 modified, 0 added, 0 removed)
Details
- Page properties
-
- Content
-
... ... @@ -4,20 +4,12 @@ 4 4 import twitter4j.Twitter; 5 5 6 6 public class TwitterGroovy { 7 - TWitter twitter; 8 8 9 - public Twitter getTwitter(twitterID, twitterPassword) { 10 - if (twitter!=null) 11 - return twitter; 12 - 13 - twitter = new Twitter(twitterID,twitterPassword); 14 - return twitter; 8 + public Twitter getPublicTwitter() { 9 + return new Twitter(); 15 15 } 16 16 17 - public Document search(String text) { 18 - String url = "http://search.twitter.com/search.atom?q=" + text; 19 - def resp = twitter.get(url, true); 20 - def doc = resp.asDocument(); 21 - return doc; 12 + public Twitter getTwitter(twitterID, twitterPassword) { 13 + return new Twitter(twitterID,twitterPassword); 22 22 } 23 23 }