Created
November 14, 2009 10:39
-
-
Save fumokmm/234474 to your computer and use it in GitHub Desktop.
文字列をスクリプトとして実行する。これは便利。
This file contains hidden or 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
import hatenahaiku4j.* | |
api = new HatenaHaikuAPILight() | |
str = """ | |
def konna = api.getHotKeywordList().first() | |
def konnaUsers = konna.api.getTimeline()*.user | |
def konnaKeyword = konnaUsers.collect{ | |
it.api.getTimeline()*.keyword | |
}.flatten().unique() | |
""" | |
def shell = new GroovyShell() | |
shell.setVariable('api', api) | |
def result = shell.evaluate(str) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment