Module: Foursquare2::Checkins
- Included in:
- Client
- Defined in:
- lib/foursquare2/checkins.rb
Instance Method Summary collapse
-
#add_checkin(options = {}) ⇒ Object
Checkin on behalf of the user.
-
#add_checkin_comment(checkin_id, options = {}) ⇒ Object
Add a comment to a checkin.
-
#add_checkin_post(checkin_id, options = {}) ⇒ Object
Add a post to a checkin.
-
#add_checkin_reply(checkin_id, options = {}) ⇒ Object
Add a reply to a checkin.
-
#checkin(checkin_id, options = {}) ⇒ Object
Retrive information about a single checkin.
-
#delete_checkin_comment(checkin_id, options = {}) ⇒ Object
Delete a checkin’s comment.
-
#recent_checkins(options = {}) ⇒ Object
Retrive a list of recent checkins from friends.
Instance Method Details
#add_checkin(options = {}) ⇒ Object
Checkin on behalf of the user.
43 44 45 46 47 48 |
# File 'lib/foursquare2/checkins.rb', line 43 def add_checkin(={}) response = connection.post do |req| req.url "checkins/add", end return_error_or_body(response, response.body.response.checkin) end |
#add_checkin_comment(checkin_id, options = {}) ⇒ Object
Add a comment to a checkin.
56 57 58 59 60 61 |
# File 'lib/foursquare2/checkins.rb', line 56 def add_checkin_comment(checkin_id, ={}) response = connection.post do |req| req.url "checkins/#{checkin_id}/addcomment", end return_error_or_body(response, response.body.response) end |
#add_checkin_post(checkin_id, options = {}) ⇒ Object
Add a post to a checkin.
84 85 86 87 88 89 |
# File 'lib/foursquare2/checkins.rb', line 84 def add_checkin_post(checkin_id, ={}) response = connection.post do |req| req.url "checkins/#{checkin_id}/addpost", end return_error_or_body(response, response.body.response.post) end |
#add_checkin_reply(checkin_id, options = {}) ⇒ Object
Add a reply to a checkin.
99 100 101 102 103 104 |
# File 'lib/foursquare2/checkins.rb', line 99 def add_checkin_reply(checkin_id, ={}) response = connection.post do |req| req.url "checkins/#{checkin_id}/reply", end return_error_or_body(response, response.body.response.reply) end |
#checkin(checkin_id, options = {}) ⇒ Object
Retrive information about a single checkin.
10 11 12 13 14 15 |
# File 'lib/foursquare2/checkins.rb', line 10 def checkin(checkin_id, ={}) response = connection.get do |req| req.url "checkins/#{checkin_id}", end return_error_or_body(response, response.body.response.checkin) end |
#delete_checkin_comment(checkin_id, options = {}) ⇒ Object
Delete a checkin’s comment
69 70 71 72 73 74 |
# File 'lib/foursquare2/checkins.rb', line 69 def delete_checkin_comment(checkin_id, ={}) response = connection.post do |req| req.url "checkins/#{checkin_id}/deletecomment", end return_error_or_body(response, response.body.response) end |
#recent_checkins(options = {}) ⇒ Object
Retrive a list of recent checkins from friends.
24 25 26 27 28 29 |
# File 'lib/foursquare2/checkins.rb', line 24 def recent_checkins(={}) response = connection.get do |req| req.url "checkins/recent", end return_error_or_body(response, response.body.response.recent) end |