1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00
This commit is contained in:
nov 2014-05-25 15:16:46 +09:00
parent c3c8798893
commit 9ecdb091d3
3 changed files with 31 additions and 1 deletions

View file

@ -0,0 +1,12 @@
module FbGraph2
class Edge
module Groups
def groups(params = {})
groups = self.edge :groups, params
groups.collect do |group|
Group.new(group[:id], group).authenticate self.access_token
end
end
end
end
end

18
lib/fb_graph2/group.rb Normal file
View file

@ -0,0 +1,18 @@
module FbGraph2
class Group < Node
register_attributes(
raw: [
:description, :email, :icon, :link, :name, :privacy,
# NOTE: in groups edge context
:administrator, :bookmark_order, :unread
],
time: [:updated_time],
custom: [:cover, :owner, :parent]
)
def initialize(id, attributes = {})
super
# TODO: handle custom attributes.
end
end
end

View file

@ -6,7 +6,7 @@ module FbGraph2
:current_location, :description, :directed_by, :founded, :general_info, :general_manager, :hometown,
:is_permanently_closed, :is_published, :is_unclaimed, :likes, :link, :mission, :name, :phone, :press_contact,
:products, :talking_about_count, :username, :website, :were_here_count,
# only within /:user_id/accounts context
# NOTE: only within /:user_id/accounts context
:perms
],
time: [:created_time],