Class Facebooker::Group
In: lib/facebooker/models/group.rb
Parent: Object

Methods

Included Modules

Model

Classes and Modules

Class Facebooker::Group::Membership

Attributes

creator  [RW] 
description  [RW] 
group_subtype  [RW] 
group_type  [RW] 
name  [RW] 
nid  [RW] 
office  [RW] 
pic  [RW] 
pic_big  [RW] 
pic_small  [RW] 
privacy  [RW] 
recent_news  [RW] 
update_time  [RW] 
venue  [RW] 
website  [RW] 

Public Instance methods

Get the full list of members as populated User objects. First time fetches group members via Facebook API call. Subsequent calls return cached values. This is a convenience method for getting all of the Membership instances and instantiating User instances for each Membership.

[Source]

# File lib/facebooker/models/group.rb, line 19
    def members
      @members ||= memberships.map do |membership|
        User.new(membership.uid, session)
      end
    end

Get a list of Membership instances associated with this Group. First call retrieves the Membership instances via a Facebook API call. Subsequent calls are retrieved from in-memory cache.

[Source]

# File lib/facebooker/models/group.rb, line 28
    def memberships
      @memberships ||= session.post('facebook.groups.getMembers', :gid => gid).map do |hash|
        Membership.from_hash(hash) do |membership|
          membership.gid = gid
        end
      end
    end

[Validate]