Thursday, February 19, 2009

Tweeting from the Scala interpreter

Verifying ricky_clarkson's post. Nice!


.oO(esmith@esmith-md jtwitter) wget
http://www.winterwell.com/software/jtwitter/jtwitter.jar
--17:04:20-- http://www.winterwell.com/software/jtwitter/jtwitter.jar
=> `jtwitter.jar'
Resolving www.winterwell.com... done.
Connecting to www.winterwell.com[91.197.32.158]:80... connected.
HTTP request sent, awaiting response... 200 OK
Length: 197,281 [application/java-archive]

100%[==========>] 197,281 175.94K/s ETA 00:00

17:04:22 (175.94 KB/s) - `jtwitter.jar' saved [197281/197281]

.oO(esmith@esmith-md jtwitter) scala -classpath jtwitter.jar
Welcome to Scala version 2.7.3.final (Java HotSpot(TM)
Client VM, Java 1.5.0_16).
Type in expressions to have them evaluated.
Type :help for more information.

scala> import scala.collection.jcl.Conversions._
import scala.collection.jcl.Conversions._

scala> import winterwell.jtwitter.Twitter
import winterwell.jtwitter.Twitter

scala> val twitter = new Twitter("eishay", "*****")
twitter: winterwell.jtwitter.Twitter =
winterwell.jtwitter.Twitter@d5cac4

scala> twitter.getFriendsTimeline() take 10 map (s => s.getUser +
":" + s) foreach println
Slashdot:Security Researcher Kaminsky Pushes DNS Patching
http://tinyurl.com/cffent
Joe Nuxoll:Hey - everyone going to the Java Posse Roundup 2009,
please follow the twitter account @JPR09
WebGuild:Why Sun's New Cloud CTO Targeting Migration of Legacy
Apps First: By Chris Preimesberger Sun's new cloud computi..
http://tinyurl.com/c7xhv9
WebGuild:Mobile Ads Stick: According to a study released today
by eMarketer, and reported on paidContent.org, mobile ads ..
http://tinyurl.com/ary96n
WebGuild:Webstock 09 : Russ Weakley: Works at the Australian
Museum. Had an idea for the museum web site 4 years ago and
.. http://tinyurl.com/demodm
WebGuild:Cloud Computing Is a Tool, Not a Strategy: This week
IÕm listening in on HP talk to some of its customers about
.. http://tinyurl.com/d42jsa
popurls:Leaked Photo of the Next-Generation Mac Mini?
http://pop-go.com/15r
ZDNet Blogs:The message from GSMA Barcelona: fragmentation -
http://tinyurl.com/cymzj4
linkedin_news:"Facebook retains terms of service after users
voice concerns" by usa today [Facebook 100% ] http://tinyurl.com/cvqtnj
Technology Geek:Lifehacker - Best Live CDs? [Hive Five Call For Contenders] http://bit.ly/nElqh

scala> twitter.setStatus("Tweeting from the Scala interpreter")
res7: winterwell.jtwitter.Twitter.Status = Tweeting from the Scala interpreter

0 comments:

Creative Commons License This work by Eishay Smith is licensed under a Creative Commons Attribution 3.0 Unported License.