Class: Facebooker::Page
- Inherits:
-
Object
- Object
- Facebooker::Page
- Includes:
- Model
- Defined in:
- lib/facebooker/models/page.rb
Defined Under Namespace
Classes: Genre
Instance Attribute Summary collapse
-
#awards ⇒ Object
Returns the value of attribute awards.
-
#band_members ⇒ Object
Returns the value of attribute band_members.
-
#bio ⇒ Object
Returns the value of attribute bio.
-
#company_overview ⇒ Object
Returns the value of attribute company_overview.
-
#directed_by ⇒ Object
Returns the value of attribute directed_by.
-
#founded ⇒ Object
Returns the value of attribute founded.
-
#genre ⇒ Object
Returns the value of attribute genre.
-
#has_added_app ⇒ Object
Returns the value of attribute has_added_app.
-
#hometown ⇒ Object
Returns the value of attribute hometown.
-
#hours ⇒ Object
Returns the value of attribute hours.
-
#influences ⇒ Object
Returns the value of attribute influences.
-
#location ⇒ Object
Returns the value of attribute location.
-
#mission ⇒ Object
Returns the value of attribute mission.
-
#name ⇒ Object
Returns the value of attribute name.
-
#network ⇒ Object
Returns the value of attribute network.
-
#page_id ⇒ Object
Returns the value of attribute page_id.
-
#page_url ⇒ Object
Returns the value of attribute page_url.
-
#pic_big ⇒ Object
Returns the value of attribute pic_big.
-
#pic_large ⇒ Object
Returns the value of attribute pic_large.
-
#pic_small ⇒ Object
Returns the value of attribute pic_small.
-
#pic_square ⇒ Object
Returns the value of attribute pic_square.
-
#plot_outline ⇒ Object
Returns the value of attribute plot_outline.
-
#produced_by ⇒ Object
Returns the value of attribute produced_by.
-
#products ⇒ Object
Returns the value of attribute products.
-
#record_label ⇒ Object
Returns the value of attribute record_label.
-
#release_date ⇒ Object
Returns the value of attribute release_date.
-
#schedule ⇒ Object
Returns the value of attribute schedule.
-
#season ⇒ Object
Returns the value of attribute season.
-
#starring ⇒ Object
Returns the value of attribute starring.
-
#studio ⇒ Object
Returns the value of attribute studio.
-
#type ⇒ Object
Returns the value of attribute type.
-
#website ⇒ Object
Returns the value of attribute website.
-
#written_by ⇒ Object
Returns the value of attribute written_by.
Instance Method Summary collapse
-
#initialize(*args) ⇒ Page
constructor
A new instance of Page.
- #user_is_admin?(user) ⇒ Boolean
- #user_is_fan?(user) ⇒ Boolean
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
#awards ⇒ Object
Returns the value of attribute awards.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def awards @awards end |
#band_members ⇒ Object
Returns the value of attribute band_members.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def band_members @band_members end |
#bio ⇒ Object
Returns the value of attribute bio.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def bio @bio end |
#company_overview ⇒ Object
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_by ⇒ Object
Returns the value of attribute directed_by.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def directed_by @directed_by end |
#founded ⇒ Object
Returns the value of attribute founded.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def founded @founded end |
#genre ⇒ Object
Returns the value of attribute genre.
30 31 32 |
# File 'lib/facebooker/models/page.rb', line 30 def genre @genre end |
#has_added_app ⇒ Object
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 |
#hometown ⇒ Object
Returns the value of attribute hometown.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def hometown @hometown end |
#hours ⇒ Object
Returns the value of attribute hours.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def hours @hours end |
#influences ⇒ Object
Returns the value of attribute influences.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def influences @influences end |
#location ⇒ Object
Returns the value of attribute location.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def location @location end |
#mission ⇒ Object
Returns the value of attribute mission.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def mission @mission end |
#name ⇒ Object
Returns the value of attribute name.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def name @name end |
#network ⇒ Object
Returns the value of attribute network.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def network @network end |
#page_id ⇒ Object
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_url ⇒ Object
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_big ⇒ Object
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_large ⇒ Object
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_small ⇒ Object
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_square ⇒ Object
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_outline ⇒ Object
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_by ⇒ Object
Returns the value of attribute produced_by.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def produced_by @produced_by end |
#products ⇒ Object
Returns the value of attribute products.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def products @products end |
#record_label ⇒ Object
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_date ⇒ Object
Returns the value of attribute release_date.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def release_date @release_date end |
#schedule ⇒ Object
Returns the value of attribute schedule.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def schedule @schedule end |
#season ⇒ Object
Returns the value of attribute season.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def season @season end |
#starring ⇒ Object
Returns the value of attribute starring.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def starring @starring end |
#studio ⇒ Object
Returns the value of attribute studio.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def studio @studio end |
#type ⇒ Object
Returns the value of attribute type.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def type @type end |
#website ⇒ Object
Returns the value of attribute website.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def website @website end |
#written_by ⇒ Object
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
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
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 |