Class: FbGraph::Checkin
- Extended by:
- Searchable
- Defined in:
- lib/fb_graph/checkin.rb
Instance Attribute Summary collapse
-
#application ⇒ Object
Returns the value of attribute application.
-
#coordinates ⇒ Object
Returns the value of attribute coordinates.
-
#created_time ⇒ Object
Returns the value of attribute created_time.
-
#from ⇒ Object
Returns the value of attribute from.
-
#message ⇒ Object
Returns the value of attribute message.
-
#place ⇒ Object
Returns the value of attribute place.
-
#tags ⇒ Object
Returns the value of attribute tags.
Attributes inherited from Node
#access_token, #endpoint, #identifier
Class Method Summary collapse
-
.search(options = {}) ⇒ Object
Search for recent check-ins for an authorized user and his or her friends:.
Instance Method Summary collapse
-
#initialize(identifier, attributes = {}) ⇒ Checkin
constructor
A new instance of Checkin.
Methods included from Searchable
Methods inherited from Node
#connection, #destroy, fetch, #fetch
Methods included from Comparison
Constructor Details
#initialize(identifier, attributes = {}) ⇒ Checkin
Returns a new instance of Checkin.
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 |
# File 'lib/fb_graph/checkin.rb', line 7 def initialize(identifier, attributes = {}) super if (from = attributes[:from]) @from = FbGraph::User.new(from.delete(:id), from) end @tags = [] if ( = attributes[:tags]) FbGraph::Collection.new().each do |user| @tags << FbGraph::User.new(user.delete(:id), user) end end if (place = attributes[:place]) @place = FbGraph::Page.new(place.delete(:id), place) end @message = attributes[:message] if (coordinates = attributes[:coordinates]) # NOTE: it seems this attributes isn't used now @coordinates = FbGraph::Venue.new(location) end if (application = attributes[:application]) @application = FbGraph::Application.new(application.delete(:id), application) end if (created_time = attributes.delete(:created_time)) @created_time = Time.parse(created_time).utc end end |
Instance Attribute Details
#application ⇒ Object
Returns the value of attribute application.
5 6 7 |
# File 'lib/fb_graph/checkin.rb', line 5 def application @application end |
#coordinates ⇒ Object
Returns the value of attribute coordinates.
5 6 7 |
# File 'lib/fb_graph/checkin.rb', line 5 def coordinates @coordinates end |
#created_time ⇒ Object
Returns the value of attribute created_time.
5 6 7 |
# File 'lib/fb_graph/checkin.rb', line 5 def created_time @created_time end |
#from ⇒ Object
Returns the value of attribute from.
5 6 7 |
# File 'lib/fb_graph/checkin.rb', line 5 def from @from end |
#message ⇒ Object
Returns the value of attribute message.
5 6 7 |
# File 'lib/fb_graph/checkin.rb', line 5 def @message end |
#place ⇒ Object
Returns the value of attribute place.
5 6 7 |
# File 'lib/fb_graph/checkin.rb', line 5 def place @place end |
#tags ⇒ Object
Returns the value of attribute tags.
5 6 7 |
# File 'lib/fb_graph/checkin.rb', line 5 def @tags end |
Class Method Details
.search(options = {}) ⇒ Object
38 39 40 41 42 |
# File 'lib/fb_graph/checkin.rb', line 38 def self.search( = {}) # NOTE: # checkin search doesn't support "q=***" parameter super(nil, ) end |