Sha256: 3ed614def665666eb093dd11673a00fd5bda8277be638f36d93e68539cea0924

Contents?: true

Size: 1.72 KB

Versions: 4

Compression:

Stored size: 1.72 KB

Contents

module FbGraph
  class Page < Node
    include Connections::Albums
    include Connections::Checkins
    include Connections::Events
    include Connections::Feed
    include Connections::Groups
    include Connections::Insights
    include Connections::Links
    include Connections::Notes
    include Connections::Photos
    include Connections::Picture
    include Connections::Posts
    include Connections::Statuses
    include Connections::Tagged
    include Connections::Videos
    extend Searchable

    attr_accessor :name, :username, :link, :category, :founded, :is_community_page, :company_overview, :general_info, :mission, :products, :release_date, :fan_count, :location, :website, :like_count, :checkin_count

    def initialize(identifier, attributes = {})
      super
      @name     = attributes[:name]
      @username = attributes[:username]
      @link     = attributes[:link]
      @category = attributes[:category]
      if (founded = attributes[:founded])
        @founded = Date.parse(founded) rescue Date.new(founded.to_i)
      end
      @is_community_page = attributes[:is_community_page]
      @company_overview = attributes[:company_overview]
      @general_info = attributes[:general_info]
      @mission = attributes[:mission]
      if (products = attributes[:products])
        @products = products.split "\n"
      end
      if (release_date = attributes[:release_date])
        @release_date = Date.parse(release_date) rescue release_date
      end
      @fan_count = attributes[:fan_count]
      if (location = attributes[:location])
        @location = Venue.new(location)
      end
      @website = attributes[:website]
      @like_count = attributes[:likes]
      @checkin_count = attributes[:checkins]
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
fb_graph-1.3.1 lib/fb_graph/page.rb
fb_graph-1.3.0 lib/fb_graph/page.rb
fb_graph-1.2.5 lib/fb_graph/page.rb
fb_graph-1.2.4 lib/fb_graph/page.rb