Sha256: ea3a9c3f8019c5dc55b67a99473ade73c57ce12676a668839594a2205cdc59d8

Contents?: true

Size: 920 Bytes

Versions: 2

Compression:

Stored size: 920 Bytes

Contents

module FbGraph2
  class User < Node
    include Edge::Accounts
    include Edge::Friends
    include Edge::Feed

    register_attributes(
      raw: [
        :about, :bio, :email, :first_name, :gender, :installed, :is_verified, :link, :locale,
        :middle_name, :name, :name_format, :political, :quotes, :relationship_status, :religion,
        :timezone, :third_party_id, :verified, :website
      ],
      time: [:updated_time], # NOTE: undocumented attribute
      date: [:birthday],
      page: [:hometown, :location],
      pages: [:favorite_athletes, :favorite_teams, :inspirational_people, :languages],
      user: [:significant_other],
      custom: [:age_range, :context, :cover, :currency, :education, :work]
    )

    def initialize(id, attributes = {})
      super
      # TODO: handle custom attributes.
    end

    def self.me(access_token)
      new(:me).authenticate access_token
    end
  end
end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
fb_graph2-0.0.1 lib/fb_graph2/user.rb
fb_graph2-0.0.0 lib/fb_graph2/user.rb