Class: Twitter::Base

Inherits:
Object
  • Object
show all
Defined in:
bin/tw2ff

Instance Method Summary collapse

Instance Method Details

#all_friendsObject



122
123
124
125
126
127
128
129
130
131
132
133
# File 'bin/tw2ff', line 122

def all_friends
  list = []
  cursor = -1
  loop {
    result = friends(:cursor => cursor)
    break if result.users.nil?
    list.concat(result.users)
    cursor = result[:next_cursor]
    break if cursor.zero?
  }
  list
end

#get_profile(name) ⇒ Object



135
136
137
# File 'bin/tw2ff', line 135

def get_profile(name)
  friends(:screen_name => name).first
end