Created
August 23, 2014 13:23
-
-
Save eiryu/0c52c95a169e5ca4ada9 to your computer and use it in GitHub Desktop.
Twitterでブロックしているユーザーを表示する ref: http://qiita.com/eiryu/items/ffe898c41e23c933f503
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
@Grab('org.twitter4j:twitter4j-core:4.0.2') | |
import twitter4j.TwitterFactory | |
def show(blockingUsers) { | |
blockingUsers.each { | |
println "${it.id}\t${it.screenName}\t${it.name}" | |
} | |
} | |
def tw = TwitterFactory.singleton | |
def cursor = -1 | |
def blockingUsers = tw.getBlocksList(cursor) | |
show(blockingUsers) | |
while (blockingUsers.hasNext()) { | |
cursor = blockingUsers.nextCursor | |
blockingUsers = tw.getBlocksList(cursor) | |
show(blockingUsers) | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment