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:
parent
ad5d9cc2f6
commit
70730c98f6
3 changed files with 6 additions and 2 deletions
|
@ -70,6 +70,10 @@ module FbGraph2
|
|||
end
|
||||
when :user
|
||||
User.new raw[:id], raw
|
||||
when :users
|
||||
Collection.new(raw).collect do |_raw_|
|
||||
User.new _raw_[:id], _raw_
|
||||
end
|
||||
else
|
||||
# NOTE: handle these attributes in each class
|
||||
next
|
||||
|
|
|
@ -36,7 +36,7 @@ module FbGraph2
|
|||
page: [:best_page],
|
||||
photo: [:cover],
|
||||
users: [
|
||||
# NOTE: only as Struct::Work#projects
|
||||
# NOTE: only as Struct::Education#classes and Struct::Work#projects
|
||||
:with
|
||||
],
|
||||
custom: [
|
||||
|
|
|
@ -4,7 +4,7 @@ module FbGraph2
|
|||
register_attributes(
|
||||
raw: [:type],
|
||||
page: [:school, :year],
|
||||
pages: [:concentration]
|
||||
pages: [:classes, :concentration]
|
||||
)
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue