class LiveJournal::Request::Friends

Attributes

friendofs[R]
friends[R]

Public Class Methods

new(user, opts={}) click to toggle source

Allowed options:

:include_friendofs => true

also fill out @friendofs in single request

Calls superclass method
# File lib/livejournal/friends.rb, line 75
def initialize(user, opts={})
  super(user, 'getfriends')
  @friends = nil
  @friendofs = nil
  @request['includefriendof'] = true if opts.has_key? :include_friendofs
end

Public Instance Methods

run() click to toggle source

Returns an array of LiveJournal::Friend.

Calls superclass method
# File lib/livejournal/friends.rb, line 82
def run
  super
  @friends = build_array('friend') { |r| Friend.new.from_request(r) }
  @friendofs = build_array('friendof') { |r| Friend.new.from_request(r) }
  @friends
end