Class: Facebooker::Page

Inherits:
Object
  • Object
show all
Includes:
Model
Defined in:
lib/facebooker/models/page.rb

Defined Under Namespace

Classes: Genre

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

#anon=, included, #populate, #populate_from_hash!, #populated?, #session

Constructor Details

#initialize(*args) ⇒ Page

Returns a new instance of Page.



5
6
7
8
9
10
11
# File 'lib/facebooker/models/page.rb', line 5

def initialize(*args)
  if args.size == 1 and (args.first.is_a?(Integer) or args.first.is_a?(String))
    self.page_id=args.first
  else
    super
  end
end

Instance Attribute Details

#awardsObject

Returns the value of attribute awards.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def awards
  @awards
end

#band_membersObject

Returns the value of attribute band_members.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def band_members
  @band_members
end

#bioObject

Returns the value of attribute bio.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def bio
  @bio
end

#company_overviewObject

Returns the value of attribute company_overview.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def company_overview
  @company_overview
end

#directed_byObject

Returns the value of attribute directed_by.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def directed_by
  @directed_by
end

#foundedObject

Returns the value of attribute founded.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def founded
  @founded
end

#genreObject

Returns the value of attribute genre.



30
31
32
# File 'lib/facebooker/models/page.rb', line 30

def genre
  @genre
end

#has_added_appObject

Returns the value of attribute has_added_app.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def has_added_app
  @has_added_app
end

#hometownObject

Returns the value of attribute hometown.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def hometown
  @hometown
end

#hoursObject

Returns the value of attribute hours.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def hours
  @hours
end

#influencesObject

Returns the value of attribute influences.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def influences
  @influences
end

#locationObject

Returns the value of attribute location.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def location
  @location
end

#missionObject

Returns the value of attribute mission.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def mission
  @mission
end

#nameObject

Returns the value of attribute name.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def name
  @name
end

#networkObject

Returns the value of attribute network.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def network
  @network
end

#page_idObject

Returns the value of attribute page_id.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def page_id
  @page_id
end

#page_urlObject

Returns the value of attribute page_url.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def page_url
  @page_url
end

#pic_bigObject

Returns the value of attribute pic_big.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def pic_big
  @pic_big
end

#pic_largeObject

Returns the value of attribute pic_large.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def pic_large
  @pic_large
end

#pic_smallObject

Returns the value of attribute pic_small.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def pic_small
  @pic_small
end

#pic_squareObject

Returns the value of attribute pic_square.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def pic_square
  @pic_square
end

#plot_outlineObject

Returns the value of attribute plot_outline.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def plot_outline
  @plot_outline
end

#produced_byObject

Returns the value of attribute produced_by.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def produced_by
  @produced_by
end

#productsObject

Returns the value of attribute products.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def products
  @products
end

#record_labelObject

Returns the value of attribute record_label.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def record_label
  @record_label
end

#release_dateObject

Returns the value of attribute release_date.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def release_date
  @release_date
end

#scheduleObject

Returns the value of attribute schedule.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def schedule
  @schedule
end

#seasonObject

Returns the value of attribute season.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def season
  @season
end

#starringObject

Returns the value of attribute starring.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def starring
  @starring
end

#studioObject

Returns the value of attribute studio.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def studio
  @studio
end

#typeObject

Returns the value of attribute type.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def type
  @type
end

#websiteObject

Returns the value of attribute website.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def website
  @website
end

#written_byObject

Returns the value of attribute written_by.



29
30
31
# File 'lib/facebooker/models/page.rb', line 29

def written_by
  @written_by
end

Instance Method Details

#user_is_admin?(user) ⇒ Boolean

Returns:

  • (Boolean)


36
37
38
# File 'lib/facebooker/models/page.rb', line 36

def user_is_admin?(user)
  Session.current.post('facebook.pages.isAdmin', :page_id=>self.page_id, :uid=>Facebooker::User.cast_to_facebook_id(user))
end

#user_is_fan?(user) ⇒ Boolean

Returns:

  • (Boolean)


40
41
42
# File 'lib/facebooker/models/page.rb', line 40

def user_is_fan?(user)
  Session.current.post('facebook.pages.isFan', :page_id=>self.page_id, :uid=>Facebooker::User.cast_to_facebook_id(user))
end