Class: Facebooker::Event::Attendance

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

Overview

The relationship between a Facebook user and an Event to which he or she has been invited and may or may not be attending (based on #rsvp_status)

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Model

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

Instance Attribute Details

#eidObject

Returns the value of attribute eid.



10
11
12
# File 'lib/facebooker/models/event.rb', line 10

def eid
  @eid
end

#rsvp_statusObject

Returns the value of attribute rsvp_status.



10
11
12
# File 'lib/facebooker/models/event.rb', line 10

def rsvp_status
  @rsvp_status
end

#uidObject

Returns the value of attribute uid.



10
11
12
# File 'lib/facebooker/models/event.rb', line 10

def uid
  @uid
end

Instance Method Details

#eventObject

Get the full, populated Event object which this Attendance is associated with. First access will query the Facebook API (facebook.events.get). Subsequent calls are retrieved from in-memory cache.



16
17
18
# File 'lib/facebooker/models/event.rb', line 16

def event
  @event ||= Event.from_hash(session.post('facebook.events.get', :eids => [eid]).first)
end