Created
March 7, 2013 07:07
-
-
Save gautamarora/5106117 to your computer and use it in GitHub Desktop.
Search Twitter
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
def url = "http://search.twitter.com/search.json?q=java&rpp=5&include_entities=true&result_type=mixed" | |
def result = new JsonSlurper().parse(new BufferedReader(new InputStreamReader(new URL(url).openStream()))) | |
println result.results[0].text | |
println "@" + result.results[0].from_user |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment