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

#affiliationObject

Returns the value of attribute affiliation.



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

def affiliation
  @affiliation
end

#artists_we_likeObject

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

#attireObject

Returns the value of attribute attire.



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

def attire
  @attire
end

#awardsObject

Returns the value of attribute awards.



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

def awards
  @awards
end

#band_interestsObject

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_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

#birthdayObject

Returns the value of attribute birthday.



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

def birthday
  @birthday
end

#booking_agentObject

Returns the value of attribute booking_agent.



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

def booking_agent
  @booking_agent
end

#builtObject

Returns the value of attribute built.



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

def built
  @built
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

#culinary_teamObject

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_locationObject

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_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

#fan_countObject

Returns the value of attribute fan_count.



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

def fan_count
  @fan_count
end

#featuresObject

Returns the value of attribute features.



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

def features
  @features
end

#foundedObject

Returns the value of attribute founded.



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

def founded
  @founded
end

#general_infoObject

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_managerObject

Returns the value of attribute general_manager.



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

def general_manager
  @general_manager
end

#genreObject

Returns the value of attribute genre.



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

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

#membersObject

Returns the value of attribute members.



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

def members
  @members
end

#missionObject

Returns the value of attribute mission.



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

def mission
  @mission
end

#mpgObject

Returns the value of attribute mpg.



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

def mpg
  @mpg
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 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_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

#parkingObject

Returns the value of attribute parking.



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

def parking
  @parking
end

#payment_optionsObject

Returns the value of attribute payment_options.



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

def payment_options
  @payment_options
end

#personal_infoObject

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_interestsObject

Returns the value of attribute personal_interests.



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

def personal_interests
  @personal_interests
end

#picObject

Returns the value of attribute pic.



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

def pic
  @pic
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

#price_rangeObject

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_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

#public_transitObject

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_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

#restaurant_servicesObject

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_specialtiesObject

Returns the value of attribute restaurant_specialties.



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

def restaurant_specialties
  @restaurant_specialties
end

#scheduleObject

Returns the value of attribute schedule.



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

def schedule
  @schedule
end

#screenplay_byObject

Returns the value of attribute screenplay_by.



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

def screenplay_by
  @screenplay_by
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)


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

Returns:

  • (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