Class: FbGraph::User
- Includes:
- Connections::Activities, Connections::Albums, Connections::Books, Connections::Events, Connections::Feed, Connections::Friends, Connections::Groups, Connections::Home, Connections::Interests, Connections::Likes, Connections::Links, Connections::Movies, Connections::Music, Connections::Notes, Connections::Photos, Connections::Picture, Connections::Posts, Connections::Statuses, Connections::Tagged, Connections::Television, Connections::Videos
- Defined in:
- lib/fb_graph/user.rb
Instance Attribute Summary collapse
-
#about ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#birthday ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#education ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#email ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#first_name ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#last_name ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#link ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#name ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#website ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
-
#work ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(identifier, options = {}) ⇒ User
constructor
A new instance of User.
Methods included from Connections::Events
Methods included from Connections::Notes
Methods included from Connections::Links
Methods included from Connections::Statuses
Methods included from Connections::Groups
Methods included from Connections::Videos
Methods included from Connections::Albums
Methods included from Connections::Photos
Methods included from Connections::Likes
Methods included from Connections::Television
Methods included from Connections::Movies
Methods included from Connections::Books
Methods included from Connections::Music
Methods included from Connections::Interests
Methods included from Connections::Activities
Methods included from Connections::Friends
Methods included from Connections::Picture
Methods included from Connections::Posts
Methods included from Connections::Tagged
Methods included from Connections::Feed
Methods included from Connections::Home
Methods inherited from Node
Methods included from Comparison
Constructor Details
#initialize(identifier, options = {}) ⇒ User
Returns a new instance of User.
32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 |
# File 'lib/fb_graph/user.rb', line 32 def initialize(identifier, = {}) super @name = [:name] @last_name = [:last_name] @first_name = [:first_name] @link = [:link] @about = [:about] @email = [:email] if [:birthday] month, day, year = [:birthday].split('/').collect(&:to_i) year ||= 0 @birthday = Date.new(year, month, day) end @work = [] if [:work] [:work].each do |work| @work << FbGraph::Work.new(work) end end @education = [] if [:education] [:education].each do |education| @education << FbGraph::Education.new(education) end end @website = [:website].to_s.split("\n") end |
Instance Attribute Details
#about ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def about @about end |
#birthday ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def birthday @birthday end |
#education ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def education @education end |
#email ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def email @email end |
#first_name ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def first_name @first_name end |
#last_name ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def last_name @last_name end |
#link ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def link @link end |
#name ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def name @name end |
#website ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def website @website end |
#work ⇒ Object
TODO: include Connections::Inbox include Connections::Outbox include Connections::Updates
30 31 32 |
# File 'lib/fb_graph/user.rb', line 30 def work @work end |
Class Method Details
.me(access_token) ⇒ Object
60 61 62 |
# File 'lib/fb_graph/user.rb', line 60 def self.me(access_token) new('me', :access_token => access_token) end |