Module: Frontapp::Client::Comments
- Included in:
- Frontapp::Client
- Defined in:
- lib/frontapp/client/comments.rb
Instance Method Summary collapse
-
#create_comment!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description ———————————— conversation_id string Id of the requested conversation ————————————.
-
#get_comment(comment_id) ⇒ Object
Parameters Name Type Description ——————————- comment_id string Id of the requested comment ——————————-.
-
#get_comment_mentions(comment_id) ⇒ Object
Parameters Name Type Description ——————————- comment_id string Id of the requested comment ——————————-.
-
#get_conversation_comments(conversation_id) ⇒ Object
Parameters Name Type Description ———————————— conversation_id string Id of the requested conversation ————————————.
Instance Method Details
#create_comment!(conversation_id, params = {}) ⇒ Object
Parameters Name Type Description
conversation_id string Id of the requested conversation
Allowed attributes: Name Type Description
author_id string Id of the teammate creating the comment body string Content of the comment
17 18 19 20 |
# File 'lib/frontapp/client/comments.rb', line 17 def create_comment!(conversation_id, params = {}) cleaned = params.permit(:author_id, :body) create("conversations/#{conversation_id}/comments", cleaned) end |
#get_comment(comment_id) ⇒ Object
Parameters Name Type Description
comment_id string Id of the requested comment
36 37 38 |
# File 'lib/frontapp/client/comments.rb', line 36 def get_comment(comment_id) get("comments/#{comment_id}") end |
#get_comment_mentions(comment_id) ⇒ Object
Parameters Name Type Description
comment_id string Id of the requested comment
45 46 47 |
# File 'lib/frontapp/client/comments.rb', line 45 def get_comment_mentions(comment_id) get("comments/#{comment_id}/mentions") end |
#get_conversation_comments(conversation_id) ⇒ Object
Parameters Name Type Description
conversation_id string Id of the requested conversation
27 28 29 |
# File 'lib/frontapp/client/comments.rb', line 27 def get_conversation_comments(conversation_id) list("conversations/#{conversation_id}/comments") end |