Module: Bugsnag::Api::Client::Events
- Included in:
- Bugsnag::Api::Client
- Defined in:
- lib/bugsnag/api/client/events.rb
Overview
Methods for the Events API
Instance Method Summary collapse
-
#delete_event(project_id, id, options = {}) ⇒ Object
Delete an Event.
-
#error_events(project_id, error_id, options = {}) ⇒ Array<Sawyer::Resource>
List the Events on an Error.
-
#event(project_id, id, options = {}) ⇒ Sawyer::Resource
View an Event.
-
#events(project_id, options = {}) ⇒ Array<Sawyer::Resource>
List the Events on a Project.
-
#latest_event(error_id, options = {}) ⇒ Sawyer::Resource
View the latest Event on an Error.
Instance Method Details
#delete_event(project_id, id, options = {}) ⇒ Object
Delete an Event
21 22 23 |
# File 'lib/bugsnag/api/client/events.rb', line 21 def delete_event(project_id, id, = {}) boolean_from_response :delete, "projects/#{project_id}/events/#{id}", end |
#error_events(project_id, error_id, options = {}) ⇒ Array<Sawyer::Resource>
List the Events on an Error
33 34 35 |
# File 'lib/bugsnag/api/client/events.rb', line 33 def error_events(project_id, error_id, = {}) paginate "projects/#{project_id}/errors/#{error_id}/events", end |
#event(project_id, id, options = {}) ⇒ Sawyer::Resource
View an Event
13 14 15 |
# File 'lib/bugsnag/api/client/events.rb', line 13 def event(project_id, id, = {}) get "projects/#{project_id}/events/#{id}", end |
#events(project_id, options = {}) ⇒ Array<Sawyer::Resource>
List the Events on a Project
53 54 55 |
# File 'lib/bugsnag/api/client/events.rb', line 53 def events(project_id, = {}) get "projects/#{project_id}/events", end |
#latest_event(error_id, options = {}) ⇒ Sawyer::Resource
View the latest Event on an Error
41 42 43 |
# File 'lib/bugsnag/api/client/events.rb', line 41 def latest_event(error_id, = {}) get "errors/#{error_id}/latest_event", end |