1
0
Fork 0
mirror of https://github.com/nov/fb_graph2 synced 2023-03-27 23:22:15 -04:00

added education#classes and fixed "users" assigner

This commit is contained in:
nov 2014-07-13 18:31:18 +09:00
parent ad5d9cc2f6
commit 70730c98f6
3 changed files with 6 additions and 2 deletions

View file

@ -70,6 +70,10 @@ module FbGraph2
end end
when :user when :user
User.new raw[:id], raw User.new raw[:id], raw
when :users
Collection.new(raw).collect do |_raw_|
User.new _raw_[:id], _raw_
end
else else
# NOTE: handle these attributes in each class # NOTE: handle these attributes in each class
next next

View file

@ -36,7 +36,7 @@ module FbGraph2
page: [:best_page], page: [:best_page],
photo: [:cover], photo: [:cover],
users: [ users: [
# NOTE: only as Struct::Work#projects # NOTE: only as Struct::Education#classes and Struct::Work#projects
:with :with
], ],
custom: [ custom: [

View file

@ -4,7 +4,7 @@ module FbGraph2
register_attributes( register_attributes(
raw: [:type], raw: [:type],
page: [:school, :year], page: [:school, :year],
pages: [:concentration] pages: [:classes, :concentration]
) )
end end
end end