class Dogapi::V1::CommentService
Constants
- API_VERSION
Public Instance Methods
comment(message, options = {})
click to toggle source
Submit a comment.
# File lib/dogapi/v1/comment.rb, line 11 def comment(message, options = {}) begin params = { :api_key => @api_key, :application_key => @application_key } body = { 'message' => message, }.merge options request(Net::HTTP::Post, "/api/#{API_VERSION}/comments", params, body, true) rescue Exception => e suppress_error_if_silent e end end
delete_comment(comment_id)
click to toggle source
# File lib/dogapi/v1/comment.rb, line 46 def delete_comment(comment_id) begin params = { :api_key => @api_key, :application_key => @application_key } request(Net::HTTP::Delete, "/api/#{API_VERSION}/comments/#{comment_id}", params, nil, false) rescue Exception => e suppress_error_if_silent e end end
update_comment(comment_id, options = {})
click to toggle source
Update a comment.
# File lib/dogapi/v1/comment.rb, line 29 def update_comment(comment_id, options = {}) begin params = { :api_key => @api_key, :application_key => @application_key } if options.empty? raise "Must update something." end request(Net::HTTP::Put, "/api/#{API_VERSION}/comments/#{comment_id}", params, options, true) rescue Exception => e suppress_error_if_silent e end end