Class: Facebooker::Event::Attendance
- Inherits:
-
Object
- Object
- Facebooker::Event::Attendance
- 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
-
#eid ⇒ Object
Returns the value of attribute eid.
-
#rsvp_status ⇒ Object
Returns the value of attribute rsvp_status.
-
#uid ⇒ Object
Returns the value of attribute uid.
Instance Method Summary collapse
-
#event ⇒ Object
Get the full, populated Event object which this Attendance is associated with.
Methods included from Model
#anon=, included, #initialize, #populate, #populate_from_hash!, #populated?, #session
Instance Attribute Details
#eid ⇒ Object
Returns the value of attribute eid.
10 11 12 |
# File 'lib/facebooker/models/event.rb', line 10 def eid @eid end |
#rsvp_status ⇒ Object
Returns the value of attribute rsvp_status.
10 11 12 |
# File 'lib/facebooker/models/event.rb', line 10 def rsvp_status @rsvp_status end |
#uid ⇒ Object
Returns the value of attribute uid.
10 11 12 |
# File 'lib/facebooker/models/event.rb', line 10 def uid @uid end |
Instance Method Details
#event ⇒ Object
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 |