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

- (Page) initialize(*args)

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

- (Object) affiliation

Returns the value of attribute affiliation



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

def affiliation
  @affiliation
end

- (Object) artists_we_like

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

- (Object) attire

Returns the value of attribute attire



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

def attire
  @attire
end

- (Object) awards

Returns the value of attribute awards



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

def awards
  @awards
end

- (Object) band_interests

Returns the value of attribute band_interests



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

def band_interests
  @band_interests
end

- (Object) band_members

Returns the value of attribute band_members



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

def band_members
  @band_members
end

- (Object) bio

Returns the value of attribute bio



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

def bio
  @bio
end

- (Object) birthday

Returns the value of attribute birthday



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

def birthday
  @birthday
end

- (Object) booking_agent

Returns the value of attribute booking_agent



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

def booking_agent
  @booking_agent
end

- (Object) built

Returns the value of attribute built



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

def built
  @built
end

- (Object) company_overview

Returns the value of attribute company_overview



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

def company_overview
  @company_overview
end

- (Object) culinary_team

Returns the value of attribute culinary_team



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

def culinary_team
  @culinary_team
end

- (Object) current_location

Returns the value of attribute current_location



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

def current_location
  @current_location
end

- (Object) directed_by

Returns the value of attribute directed_by



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

def directed_by
  @directed_by
end

- (Object) fan_count

Returns the value of attribute fan_count



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

def fan_count
  @fan_count
end

- (Object) features

Returns the value of attribute features



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

def features
  @features
end

- (Object) founded

Returns the value of attribute founded



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

def founded
  @founded
end

- (Object) general_info

Returns the value of attribute general_info



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

def general_info
  @general_info
end

- (Object) general_manager

Returns the value of attribute general_manager



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

def general_manager
  @general_manager
end

- (Object) genre

Returns the value of attribute genre



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

def genre
  @genre
end

- (Object) has_added_app

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

- (Object) hometown

Returns the value of attribute hometown



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

def hometown
  @hometown
end

- (Object) hours

Returns the value of attribute hours



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

def hours
  @hours
end

- (Object) influences

Returns the value of attribute influences



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

def influences
  @influences
end

- (Object) location

Returns the value of attribute location



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

def location
  @location
end

- (Object) members

Returns the value of attribute members



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

def members
  @members
end

- (Object) mission

Returns the value of attribute mission



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

def mission
  @mission
end

- (Object) mpg

Returns the value of attribute mpg



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

def mpg
  @mpg
end

- (Object) name

Returns the value of attribute name



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

def name
  @name
end

- (Object) network

Returns the value of attribute network



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

def network
  @network
end

- (Object) page_id 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

- (Object) page_url

Returns the value of attribute page_url



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

def page_url
  @page_url
end

- (Object) parking

Returns the value of attribute parking



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

def parking
  @parking
end

- (Object) payment_options

Returns the value of attribute payment_options



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

def payment_options
  @payment_options
end

- (Object) personal_info

Returns the value of attribute personal_info



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

def personal_info
  @personal_info
end

- (Object) personal_interests

Returns the value of attribute personal_interests



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

def personal_interests
  @personal_interests
end

- (Object) pic

Returns the value of attribute pic



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

def pic
  @pic
end

- (Object) pic_big

Returns the value of attribute pic_big



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

def pic_big
  @pic_big
end

- (Object) pic_large

Returns the value of attribute pic_large



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

def pic_large
  @pic_large
end

- (Object) pic_small

Returns the value of attribute pic_small



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

def pic_small
  @pic_small
end

- (Object) pic_square

Returns the value of attribute pic_square



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

def pic_square
  @pic_square
end

- (Object) plot_outline

Returns the value of attribute plot_outline



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

def plot_outline
  @plot_outline
end

- (Object) price_range

Returns the value of attribute price_range



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

def price_range
  @price_range
end

- (Object) produced_by

Returns the value of attribute produced_by



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

def produced_by
  @produced_by
end

- (Object) products

Returns the value of attribute products



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

def products
  @products
end

- (Object) public_transit

Returns the value of attribute public_transit



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

def public_transit
  @public_transit
end

- (Object) record_label

Returns the value of attribute record_label



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

def record_label
  @record_label
end

- (Object) release_date

Returns the value of attribute release_date



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

def release_date
  @release_date
end

- (Object) restaurant_services

Returns the value of attribute restaurant_services



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

def restaurant_services
  @restaurant_services
end

- (Object) restaurant_specialties

Returns the value of attribute restaurant_specialties



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

def restaurant_specialties
  @restaurant_specialties
end

- (Object) schedule

Returns the value of attribute schedule



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

def schedule
  @schedule
end

- (Object) screenplay_by

Returns the value of attribute screenplay_by



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

def screenplay_by
  @screenplay_by
end

- (Object) season

Returns the value of attribute season



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

def season
  @season
end

- (Object) starring

Returns the value of attribute starring



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

def starring
  @starring
end

- (Object) studio

Returns the value of attribute studio



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

def studio
  @studio
end

- (Object) type

Returns the value of attribute type



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

def type
  @type
end

- (Object) website

Returns the value of attribute website



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

def website
  @website
end

- (Object) written_by

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

- (Boolean) user_is_admin?(user)

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

- (Boolean) user_is_fan?(user)

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