Class: LiveJournal::Request::FriendOfs

Inherits:
Req
  • Object
show all
Defined in:
lib/livejournal/friends.rb

Overview

See Friends to fetch both friends and friend-ofs in one request.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods inherited from Req

#dryrun!, #dumpresponse, #verbose!

Constructor Details

#initialize(user) ⇒ FriendOfs

Returns a new instance of FriendOfs.



93
94
95
96
# File 'lib/livejournal/friends.rb', line 93

def initialize(user)
  super(user, 'friendof')
  @friendofs = nil
end

Instance Attribute Details

#friendofsObject (readonly)

Returns the value of attribute friendofs.



92
93
94
# File 'lib/livejournal/friends.rb', line 92

def friendofs
  @friendofs
end

Instance Method Details

#runObject

Returns an array of LiveJournal::Friend.



98
99
100
101
102
# File 'lib/livejournal/friends.rb', line 98

def run
  super
  @friends = build_array('friendof') { |r| Friend.new.from_request(r) }
  @friends
end