Module: Instagram::Client::Likes
- Included in:
- Instagram::Client
- Defined in:
- lib/instagram/client/likes.rb
Overview
Defines methods related to likes
Instance Method Summary collapse
-
#like_media(id, text) ⇒ Hashie::Mash
Issues a like by the currently authenticated user, for a given media item ID.
-
#media_likes(id) ⇒ Hashie::Mash
Returns a list of users who like a given media item ID.
-
#unlike_media(id) ⇒ Hashie::Mash
Removes the like on a givem media item ID for the currently authenticated user.
Instance Method Details
#like_media(id, text) ⇒ Hashie::Mash
Issues a like by the currently authenticated user, for a given media item ID
36 37 38 39 |
# File 'lib/instagram/client/likes.rb', line 36 def like_media(id, ={}) response = post("media/#{id}/likes", ) response end |
#media_likes(id) ⇒ Hashie::Mash
Returns a list of users who like a given media item ID
18 19 20 21 |
# File 'lib/instagram/client/likes.rb', line 18 def media_likes(id, *args) response = get("media/#{id}/likes") response end |
#unlike_media(id) ⇒ Hashie::Mash
Removes the like on a givem media item ID for the currently authenticated user
52 53 54 55 |
# File 'lib/instagram/client/likes.rb', line 52 def unlike_media(id, ={}) response = delete("media/#{id}/likes", ) response end |