Module: VirusTotal::Client::Action::Comments
Instance Method Summary collapse
-
#add_comment(id, text) ⇒ Hash
Add a comment to an object.
-
#comments(id) ⇒ Hash
Retrieve comments for an object.
Instance Method Details
#add_comment(id, text) ⇒ Hash
Add a comment to an object
27 28 29 30 31 32 33 34 35 36 37 38 |
# 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) ⇒ Hash
Retrieve comments for an object
14 15 16 17 |
# File 'lib/virustotal/clients/actions/comments.rb', line 14 def comments(id) id = to_id(id) _get("/#{name}/#{id}/comments") { |json| json } end |