Class: Whatser::CheckIn
- Defined in:
- lib/whatser/resources/check_in.rb
Instance Attribute Summary collapse
-
#check_in_at ⇒ Object
Returns the value of attribute check_in_at.
-
#check_out_at ⇒ Object
Returns the value of attribute check_out_at.
-
#foursquare_share ⇒ Object
Returns the value of attribute foursquare_share.
-
#gowalla_share ⇒ Object
Returns the value of attribute gowalla_share.
-
#id ⇒ Object
Returns the value of attribute id.
-
#lat ⇒ Object
Returns the value of attribute lat.
-
#lng ⇒ Object
Returns the value of attribute lng.
-
#locate_user ⇒ Object
Returns the value of attribute locate_user.
-
#message ⇒ Object
Returns the value of attribute message.
-
#name ⇒ Object
Returns the value of attribute name.
-
#poi_id ⇒ Object
Returns the value of attribute poi_id.
-
#rating ⇒ Object
Returns the value of attribute rating.
-
#user_id ⇒ Object
Returns the value of attribute user_id.
Attributes inherited from Resource
Class Method Summary collapse
Instance Method Summary collapse
Methods inherited from Resource
#api_request, api_request, client, convert_data_to_model, from_hash_to_model, #initialize, set
Constructor Details
This class inherits a constructor from Whatser::Resource
Instance Attribute Details
#check_in_at ⇒ Object
Returns the value of attribute check_in_at.
4 5 6 |
# File 'lib/whatser/resources/check_in.rb', line 4 def check_in_at @check_in_at end |
#check_out_at ⇒ Object
Returns the value of attribute check_out_at.
4 5 6 |
# File 'lib/whatser/resources/check_in.rb', line 4 def check_out_at @check_out_at end |
#foursquare_share ⇒ Object
Returns the value of attribute foursquare_share.
5 6 7 |
# File 'lib/whatser/resources/check_in.rb', line 5 def foursquare_share @foursquare_share end |
#gowalla_share ⇒ Object
Returns the value of attribute gowalla_share.
5 6 7 |
# File 'lib/whatser/resources/check_in.rb', line 5 def gowalla_share @gowalla_share end |
#id ⇒ Object
Returns the value of attribute id.
3 4 5 |
# File 'lib/whatser/resources/check_in.rb', line 3 def id @id end |
#lat ⇒ Object
Returns the value of attribute lat.
4 5 6 |
# File 'lib/whatser/resources/check_in.rb', line 4 def lat @lat end |
#lng ⇒ Object
Returns the value of attribute lng.
4 5 6 |
# File 'lib/whatser/resources/check_in.rb', line 4 def lng @lng end |
#locate_user ⇒ Object
Returns the value of attribute locate_user.
5 6 7 |
# File 'lib/whatser/resources/check_in.rb', line 5 def locate_user @locate_user end |
#message ⇒ Object
Returns the value of attribute message.
4 5 6 |
# File 'lib/whatser/resources/check_in.rb', line 4 def @message end |
#name ⇒ Object
Returns the value of attribute name.
4 5 6 |
# File 'lib/whatser/resources/check_in.rb', line 4 def name @name end |
#poi_id ⇒ Object
Returns the value of attribute poi_id.
3 4 5 |
# File 'lib/whatser/resources/check_in.rb', line 3 def poi_id @poi_id end |
#rating ⇒ Object
Returns the value of attribute rating.
4 5 6 |
# File 'lib/whatser/resources/check_in.rb', line 4 def @rating end |
#user_id ⇒ Object
Returns the value of attribute user_id.
3 4 5 |
# File 'lib/whatser/resources/check_in.rb', line 3 def user_id @user_id end |
Class Method Details
.create(poi_id, params = {}) ⇒ Object
12 13 14 |
# File 'lib/whatser/resources/check_in.rb', line 12 def create(poi_id, params={}) api_request :post, "/api/poi/#{poi_id}/check_ins", {:body => {'check_in' => params} } end |
.list(opts = {}) ⇒ Object
8 9 10 |
# File 'lib/whatser/resources/check_in.rb', line 8 def list(opts={}) api_request :get, "/api/check_ins", {:query => opts} end |
Instance Method Details
#save ⇒ Object
17 18 19 |
# File 'lib/whatser/resources/check_in.rb', line 17 def save self.class.create( self.poi_id, self.to_params ) end |
#to_params ⇒ Object
21 22 23 |
# File 'lib/whatser/resources/check_in.rb', line 21 def to_params {:lat => lat, :lng => lng, :locate => locate_user, :gowalla => gowalla_share, :foursquare => foursquare_share, :check_in_at => check_in_at, :check_out_at => check_out_at} end |