Module: Bugsnag::Api::Client::Comments
- Included in:
- Bugsnag::Api::Client
- Defined in:
- lib/bugsnag/api/client/comments.rb
Overview
Methods for the Errors API
Instance Method Summary collapse
-
#comment(id, options = {}) ⇒ Sawyer::Resource
View an Comment.
-
#comments(project_id, error_id, options = {}) ⇒ Array<Sawyer::Resource>
List Comments on an Error.
-
#create_comment(project_id, error_id, message, options = {}) ⇒ Sawyer::Resource
Create a Comment on an Error.
-
#delete_comment(id, options = {}) ⇒ Object
Delete a Comment.
-
#update_comment(id, message, options = {}) ⇒ Sawyer::Resource
Update a Comment.
Instance Method Details
#comment(id, options = {}) ⇒ Sawyer::Resource
View an Comment
25 26 27 |
# File 'lib/bugsnag/api/client/comments.rb', line 25 def comment(id, = {}) get "comments/#{id}", end |
#comments(project_id, error_id, options = {}) ⇒ Array<Sawyer::Resource>
List Comments on an Error
17 18 19 |
# File 'lib/bugsnag/api/client/comments.rb', line 17 def comments(project_id, error_id, = {}) paginate "projects/#{project_id}/errors/#{error_id}/comments", end |
#create_comment(project_id, error_id, message, options = {}) ⇒ Sawyer::Resource
Create a Comment on an Error
33 34 35 |
# File 'lib/bugsnag/api/client/comments.rb', line 33 def create_comment(project_id, error_id, , = {}) post "projects/#{project_id}/errors/#{error_id}/comments", .merge({:message => }) end |
#delete_comment(id, options = {}) ⇒ Object
Delete a Comment
49 50 51 |
# File 'lib/bugsnag/api/client/comments.rb', line 49 def delete_comment(id, = {}) boolean_from_response :delete, "comments/#{id}", end |
#update_comment(id, message, options = {}) ⇒ Sawyer::Resource
Update a Comment
41 42 43 |
# File 'lib/bugsnag/api/client/comments.rb', line 41 def update_comment(id, , = {}) patch "comments/#{id}", .merge({:message => }) end |