Module: DesignerNews::Client::Comments
- Included in:
- DesignerNews::Client
- Defined in:
- lib/designer_news/client/comments.rb
Instance Method Summary collapse
- #comment(comment_id) ⇒ Object
- #reply_to_comment(comment_id, comment) ⇒ Object
- #upvote_comment(comment_id) ⇒ Object
Instance Method Details
#comment(comment_id) ⇒ Object
4 5 6 |
# File 'lib/designer_news/client/comments.rb', line 4 def comment(comment_id) get "comments/#{comment_id}" end |
#reply_to_comment(comment_id, comment) ⇒ Object
12 13 14 |
# File 'lib/designer_news/client/comments.rb', line 12 def reply_to_comment(comment_id, comment) post "comments/#{comment_id}/reply", { comment: { body: comment } } end |
#upvote_comment(comment_id) ⇒ Object
8 9 10 |
# File 'lib/designer_news/client/comments.rb', line 8 def upvote_comment(comment_id) post "comments/#{comment_id}/upvote" end |