Created
August 7, 2008 03:33
-
-
Save ivey/4320 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
def following_pages | |
twitter_user.friends_count.to_i / 100 + 1 | |
end | |
def following | |
return @following if @following | |
@following = [] | |
1.upto(following_pages) do |i| | |
@following += twitter.friends_for(uid, :page => i, :lite => true) | |
end | |
@following | |
end | |
def followers_pages | |
twitter_user.followers_count.to_i / 100 + 1 | |
end | |
def followers | |
return @followers if @followers | |
@followers = [] | |
1.upto(followers_pages) do |i| | |
@followers += twitter.followers_for(uid, :page => i, :lite => true) | |
end | |
@followers | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment