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
|
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
|
||||||
|
|
|
@ -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: [
|
||||||
|
|
|
@ -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
|
||||||
|
|
Loading…
Reference in a new issue