Module: Instagram::Client::Comments
- Included in:
- Instagram::Client
- Defined in:
- lib/instagram/client/comments.rb
Overview
Defines methods related to comments
Instance Method Summary collapse
-
#create_media_comment(id, text) ⇒ Hashie::Mash
Creates a comment for a given media item ID.
-
#delete_media_comment(media_id, comment_id) ⇒ nil
Deletes a comment for a given media item ID.
-
#media_comments(id) ⇒ Hashie::Mash
Returns a list of comments for a given media item ID.
Instance Method Details
#create_media_comment(id, text) ⇒ Hashie::Mash
Creates a comment for a given media item ID
37 38 39 40 |
# File 'lib/instagram/client/comments.rb', line 37 def create_media_comment(id, text, ={}) response = post("media/#{id}/comments", .merge(:text => text)) response["data"] end |
#delete_media_comment(media_id, comment_id) ⇒ nil
Deletes a comment for a given media item ID
56 57 58 59 |
# File 'lib/instagram/client/comments.rb', line 56 def delete_media_comment(media_id, comment_id, ={}) response = delete("media/#{media_id}/comments/#{comment_id}", ) response["data"] end |
#media_comments(id) ⇒ Hashie::Mash
Returns a list of comments for a given media item ID
18 19 20 21 |
# File 'lib/instagram/client/comments.rb', line 18 def media_comments(id, *args) response = get("media/#{id}/comments") response["data"] end |