Module: Untappd::Client::Checkin
- Included in:
- Untappd::Client
- Defined in:
- lib/untappd-api/client/checkin.rb
Instance Method Summary collapse
-
#add_comment(checkin_id, comment) ⇒ Hashie::Mash
Add a comment to a checkin.
-
#checkin(beer_id, gmt_offset, options = {}) ⇒ Hashie::Mash
Perform a checkin with the authenticated user.
-
#checkin_details(id) ⇒ Hashie::Mash
Returns info for the specified checkin.
-
#delete_comment(comment_id) ⇒ Hashie::Mash
Delete a comment made by the authenticated user.
-
#public_feed(options = {}) ⇒ Array
(also: #the_pub)
Returns all public checkins, otherwise known as “The Pub”.
-
#toast(checkin_id) ⇒ Hashie::Mash
Toast a checkin.
-
#untoast(checkin_id) ⇒ Hashie::Mash
Remove a toast made by the authenticated user from a checkin.
Instance Method Details
#add_comment(checkin_id, comment) ⇒ Hashie::Mash
Add a comment to a checkin.
68 69 70 71 |
# File 'lib/untappd-api/client/checkin.rb', line 68 def add_comment(checkin_id, comment) = { :checkin_id => checkin_id, :comment => comment } post('/add_comment', ) end |
#checkin(beer_id, gmt_offset, options = {}) ⇒ Hashie::Mash
Perform a checkin with the authenticated user.
54 55 56 57 |
# File 'lib/untappd-api/client/checkin.rb', line 54 def checkin(beer_id, gmt_offset, ={}) .merge!(:gmt_offset => gmt_offset, :bid => beer_id) post('/checkin', ) end |
#checkin_details(id) ⇒ Hashie::Mash
Returns info for the specified checkin.
31 32 33 34 |
# File 'lib/untappd-api/client/checkin.rb', line 31 def checkin_details(id) = { :id => id } get('/details', ) end |
#delete_comment(comment_id) ⇒ Hashie::Mash
Delete a comment made by the authenticated user.
81 82 83 84 |
# File 'lib/untappd-api/client/checkin.rb', line 81 def delete_comment(comment_id) = { :comment_id => comment_id } post('/delete_comment', ) end |
#public_feed(options = {}) ⇒ Array Also known as: the_pub
Returns all public checkins, otherwise known as “The Pub”.
16 17 18 |
# File 'lib/untappd-api/client/checkin.rb', line 16 def public_feed(={}) get('/thepub', ) end |
#toast(checkin_id) ⇒ Hashie::Mash
Toast a checkin.
94 95 96 97 |
# File 'lib/untappd-api/client/checkin.rb', line 94 def toast(checkin_id) = { :checkin_id => checkin_id } post('/toast', ) end |
#untoast(checkin_id) ⇒ Hashie::Mash
Remove a toast made by the authenticated user from a checkin.
107 108 109 110 |
# File 'lib/untappd-api/client/checkin.rb', line 107 def untoast(checkin_id) = { :checkin_id => checkin_id } post('/delete_toast', ) end |