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
-
#affiliation ⇒ Object
Returns the value of attribute affiliation.
-
#artists_we_like ⇒ Object
Returns the value of attribute artists_we_like.
-
#attire ⇒ Object
Returns the value of attribute attire.
-
#awards ⇒ Object
Returns the value of attribute awards.
-
#band_interests ⇒ Object
Returns the value of attribute band_interests.
-
#band_members ⇒ Object
Returns the value of attribute band_members.
-
#bio ⇒ Object
Returns the value of attribute bio.
-
#birthday ⇒ Object
Returns the value of attribute birthday.
-
#booking_agent ⇒ Object
Returns the value of attribute booking_agent.
-
#built ⇒ Object
Returns the value of attribute built.
-
#company_overview ⇒ Object
Returns the value of attribute company_overview.
-
#culinary_team ⇒ Object
Returns the value of attribute culinary_team.
-
#current_location ⇒ Object
Returns the value of attribute current_location.
-
#directed_by ⇒ Object
Returns the value of attribute directed_by.
-
#fan_count ⇒ Object
Returns the value of attribute fan_count.
-
#features ⇒ Object
Returns the value of attribute features.
-
#founded ⇒ Object
Returns the value of attribute founded.
-
#general_info ⇒ Object
Returns the value of attribute general_info.
-
#general_manager ⇒ Object
Returns the value of attribute general_manager.
-
#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.
-
#members ⇒ Object
Returns the value of attribute members.
-
#mission ⇒ Object
Returns the value of attribute mission.
-
#mpg ⇒ Object
Returns the value of attribute mpg.
-
#name ⇒ Object
Returns the value of attribute name.
-
#network ⇒ Object
Returns the value of attribute network.
-
#page_id ⇒ Object
(also: #id)
Returns the value of attribute page_id.
-
#page_url ⇒ Object
Returns the value of attribute page_url.
-
#parking ⇒ Object
Returns the value of attribute parking.
-
#payment_options ⇒ Object
Returns the value of attribute payment_options.
-
#personal_info ⇒ Object
Returns the value of attribute personal_info.
-
#personal_interests ⇒ Object
Returns the value of attribute personal_interests.
-
#pic ⇒ Object
Returns the value of attribute pic.
-
#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.
-
#price_range ⇒ Object
Returns the value of attribute price_range.
-
#produced_by ⇒ Object
Returns the value of attribute produced_by.
-
#products ⇒ Object
Returns the value of attribute products.
-
#public_transit ⇒ Object
Returns the value of attribute public_transit.
-
#record_label ⇒ Object
Returns the value of attribute record_label.
-
#release_date ⇒ Object
Returns the value of attribute release_date.
-
#restaurant_services ⇒ Object
Returns the value of attribute restaurant_services.
-
#restaurant_specialties ⇒ Object
Returns the value of attribute restaurant_specialties.
-
#schedule ⇒ Object
Returns the value of attribute schedule.
-
#screenplay_by ⇒ Object
Returns the value of attribute screenplay_by.
-
#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
#affiliation ⇒ Object
Returns the value of attribute affiliation.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def affiliation @affiliation end |
#artists_we_like ⇒ Object
Returns the value of attribute artists_we_like.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def artists_we_like @artists_we_like end |
#attire ⇒ Object
Returns the value of attribute attire.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def attire @attire end |
#awards ⇒ Object
Returns the value of attribute awards.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def awards @awards end |
#band_interests ⇒ Object
Returns the value of attribute band_interests.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def band_interests @band_interests 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 |
#birthday ⇒ Object
Returns the value of attribute birthday.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def birthday @birthday end |
#booking_agent ⇒ Object
Returns the value of attribute booking_agent.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def booking_agent @booking_agent end |
#built ⇒ Object
Returns the value of attribute built.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def built @built 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 |
#culinary_team ⇒ Object
Returns the value of attribute culinary_team.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def culinary_team @culinary_team end |
#current_location ⇒ Object
Returns the value of attribute current_location.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def current_location @current_location 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 |
#fan_count ⇒ Object
Returns the value of attribute fan_count.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def fan_count @fan_count end |
#features ⇒ Object
Returns the value of attribute features.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def features @features end |
#founded ⇒ Object
Returns the value of attribute founded.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def founded @founded end |
#general_info ⇒ Object
Returns the value of attribute general_info.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def general_info @general_info end |
#general_manager ⇒ Object
Returns the value of attribute general_manager.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def general_manager @general_manager end |
#genre ⇒ Object
Returns the value of attribute genre.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 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 |
#members ⇒ Object
Returns the value of attribute members.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def members @members end |
#mission ⇒ Object
Returns the value of attribute mission.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def mission @mission end |
#mpg ⇒ Object
Returns the value of attribute mpg.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def mpg @mpg 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 Also known as: id
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 |
#parking ⇒ Object
Returns the value of attribute parking.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def parking @parking end |
#payment_options ⇒ Object
Returns the value of attribute payment_options.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def @payment_options end |
#personal_info ⇒ Object
Returns the value of attribute personal_info.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def personal_info @personal_info end |
#personal_interests ⇒ Object
Returns the value of attribute personal_interests.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def personal_interests @personal_interests end |
#pic ⇒ Object
Returns the value of attribute pic.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def pic @pic 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 |
#price_range ⇒ Object
Returns the value of attribute price_range.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def price_range @price_range 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 |
#public_transit ⇒ Object
Returns the value of attribute public_transit.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def public_transit @public_transit 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 |
#restaurant_services ⇒ Object
Returns the value of attribute restaurant_services.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def restaurant_services @restaurant_services end |
#restaurant_specialties ⇒ Object
Returns the value of attribute restaurant_specialties.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def restaurant_specialties @restaurant_specialties end |
#schedule ⇒ Object
Returns the value of attribute schedule.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def schedule @schedule end |
#screenplay_by ⇒ Object
Returns the value of attribute screenplay_by.
29 30 31 |
# File 'lib/facebooker/models/page.rb', line 29 def screenplay_by @screenplay_by 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
38 39 40 |
# File 'lib/facebooker/models/page.rb', line 38 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
42 43 44 |
# File 'lib/facebooker/models/page.rb', line 42 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 |