module Bugsnag::Api::Client::Events

Methods for the Events API

@see docs.bugsnagapiv2.apiary.io/#reference/errors/events

Public Instance Methods

delete_event(project_id, id, options = {}) click to toggle source

Delete an Event

@return @see docs.bugsnagapiv2.apiary.io/#reference/errors/events/delete-an-event

# File lib/bugsnag/api/client/events.rb, line 21
def delete_event(project_id, id, options = {})
  boolean_from_response :delete, "projects/#{project_id}/events/#{id}", options
end
error_events(project_id, error_id, options = {}) click to toggle source

List the Events on an Error

@option base [String] Only Error Events occuring before this time will be returned @option sort [String] Which field to sort the results by, one of: last_seen, first_seen, users, events @option direction [String] Which direction to sort the results by, one of: asc, desc @option filters [Object] An optional filter object, see docs.bugsnagapiv2.apiary.io/#introduction/filtering @return [Array<Sawyer::Resource>] List of Events for the specified Error @see docs.bugsnagapiv2.apiary.io/#reference/errors/events/list-the-events-on-an-error

# File lib/bugsnag/api/client/events.rb, line 33
def error_events(project_id, error_id, options = {})
  paginate "projects/#{project_id}/errors/#{error_id}/events", options
end
event(project_id, id, options = {}) click to toggle source

View an Event

@return [Sawyer::Resource] Requested Event @see docs.bugsnagapiv2.apiary.io/#reference/errors/events/view-an-event

# File lib/bugsnag/api/client/events.rb, line 13
def event(project_id, id, options = {})
  get "projects/#{project_id}/events/#{id}", options
end
events(project_id, options = {}) click to toggle source

List the Events on a Project

@option base [String] Only Project Events occuring before this time will be returned @option sort [String] Which field to sort the results by, one of: last_seen, first_seen, users, events @option direction [String] Which direction to sort the results by, one of: asc, desc @option filters [Object] An optional filter object, see docs.bugsnagapiv2.apiary.io/#introduction/filtering @return [Array<Sawyer::Resource>] List of Events for the specified Project @see docs.bugsnagapiv2.apiary.io/#reference/errors/events/list-the-events-on-a-project

# File lib/bugsnag/api/client/events.rb, line 53
def events(project_id, options = {})
  get "projects/#{project_id}/events", options
end
latest_event(error_id, options = {}) click to toggle source

View the latest Event on an Error

@return [Sawyer::Resource] Last event reported Event @see docs.bugsnagapiv2.apiary.io/#reference/errors/events/view-the-latest-event-on-an-error

# File lib/bugsnag/api/client/events.rb, line 41
def latest_event(error_id, options = {})
  get "errors/#{error_id}/latest_event", options
end