module VirusTotal::Client::Action::Comments
Public Instance Methods
add_comment(id, text)
click to toggle source
Add a comment to an object
@param [String] id Object identifier @param [String] text
@return [Hash]
# File lib/virustotal/clients/actions/comments.rb, line 27 def add_comment(id, text) id = to_id(id) params = { data: { type: "comment", attributes: { text: text } } } _post("/#{name}/#{id}/comments", params) { |json| json } end
comments(id)
click to toggle source
Retrieve comments for an object
@param [String] id Object identifier
@return [Hash]
# File lib/virustotal/clients/actions/comments.rb, line 14 def comments(id) id = to_id(id) _get("/#{name}/#{id}/comments") { |json| json } end