Class: FbGraph2::User
- Extended by:
- Searchable
- Includes:
- Edge::Accounts, Edge::Achievements, Edge::Activities, Edge::Albums, Edge::AppRequests, Edge::Applications, Edge::Books, Edge::Domains, Edge::Events, Edge::Family, Edge::Feed, Edge::FriendLists, Edge::Friends, Edge::Games, Edge::Groups, Edge::Home, Edge::Inbox, Edge::Interests, Edge::InvitableFriends, Edge::Likes::LikerContext, Edge::Links, Edge::Movies, Edge::Music, Edge::Notifications, Edge::Outbox, Edge::PaymentTransactions, Edge::Permissions, Edge::Photos, Edge::Picture, Edge::Pokes, Edge::Posts, Edge::Scores, Edge::Statuses, Edge::TaggableFriends, Edge::Tagged, Edge::TaggedPlaces, Edge::Television, Edge::Videos
- Defined in:
- lib/fb_graph2/user.rb
Instance Attribute Summary
Attributes inherited from Node
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(id, attributes = {}) ⇒ User
constructor
A new instance of User.
Methods included from Searchable
Methods included from Edge::Videos
Methods included from Edge::Television
Methods included from Edge::TaggedPlaces
Methods included from Edge::Tagged
Methods included from Edge::TaggableFriends
Methods included from Edge::Statuses
Methods included from Edge::Scores
Methods included from Edge::Posts
Methods included from Edge::Pokes
Methods included from Edge::Photos
Methods included from Edge::Picture
Methods included from Edge::Permissions
Methods included from Edge::PaymentTransactions
Methods included from Edge::Outbox
Methods included from Edge::Notifications
#notification!, #notifications
Methods included from Edge::Music
Methods included from Edge::Movies
Methods included from Edge::Links
Methods included from Edge::Likes::LikerContext
Methods included from Edge::InvitableFriends
Methods included from Edge::Interests
Methods included from Edge::Inbox
Methods included from Edge::Home
Methods included from Edge::Groups
Methods included from Edge::Games
Methods included from Edge::Friends
Methods included from Edge::FriendLists
Methods included from Edge::Feed
Methods included from Edge::Family
Methods included from Edge::Events
Methods included from Edge::Domains
Methods included from Edge::Books
Methods included from Edge::AppRequests
Methods included from Edge::Applications
Methods included from Edge::Albums
Methods included from Edge::Activities
Methods included from Edge::Achievements
Methods included from Edge::Accounts
Methods inherited from Node
#authenticate, #destroy, #edge, #edges, #fetch, #update
Methods included from AttributeAssigner
Constructor Details
#initialize(id, attributes = {}) ⇒ User
Returns a new instance of User.
82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 |
# File 'lib/fb_graph2/user.rb', line 82 def initialize(id, attributes = {}) super if attributes.include? :age_range self.age_range = Struct::AgeRange.new attributes[:age_range] end if attributes.include? :context self.context = Struct::Context::UserContext.new attributes[:context] end if attributes.include? :currency self.currency = Struct::Currency.new attributes[:currency] end if attributes.include? :devices self.devices = attributes[:devices].collect do |device| Struct::Device.new device end end if attributes.include? :education self.education = attributes[:education].collect do |education| Struct::Education.new education end end if attributes.include? :work self.work = attributes[:work].collect do |work| Struct::Work.new work end end end |
Class Method Details
.me(access_token) ⇒ Object
110 111 112 |
# File 'lib/fb_graph2/user.rb', line 110 def self.me(access_token) new(:me).authenticate access_token end |