class Wrike3::Comment
Public Class Methods
new(wrike)
click to toggle source
# File lib/wrike3/comment.rb, line 5 def initialize(wrike) @wrike = wrike end
Public Instance Methods
add(commentable_type, commentable_id, params = {})
click to toggle source
Add a new comment to a task
# File lib/wrike3/comment.rb, line 22 def add(commentable_type, commentable_id, params = {}) wrike.execute(:post, api_url(nested_path('comments', commentable_type, commentable_id)), params) end
delete(id)
click to toggle source
Delete a comment
# File lib/wrike3/comment.rb, line 32 def delete(id) wrike.execute(:delete, api_url("comments/#{id}")) end
details(id, params = {})
click to toggle source
Returns list of comments
# File lib/wrike3/comment.rb, line 17 def details(id, params = {}) wrike.execute(:get, api_url("comments/#{id}"), params) end
list(account_id = nil, params={})
click to toggle source
Returns list of comments
# File lib/wrike3/comment.rb, line 10 def list(account_id = nil, params={}) path = 'comments' path = "accounts/#{account_id}/#{path}" if account_id.present? wrike.execute(:get, api_url(path), params) end
update(id, params = {})
click to toggle source
Update a comment
# File lib/wrike3/comment.rb, line 27 def update(id, params = {}) wrike.execute(:put, api_url("comments/#{id}"), params) end