Module: Bugsnag::Api::Client::EventFields

Included in:
Bugsnag::Api::Client
Defined in:
lib/bugsnag/api/client/eventfields.rb

Overview

Methods for the Project Event Fields API

Instance Method Summary collapse

Instance Method Details

#create_event_field(project_id, display_id, path, filter_options, options = {}) ⇒ Sawyer::Resource

Create a custom Event Field

Parameters:

  • reindex (Hash)

    a customizable set of options

  • pivot_options (Hash)

    a customizable set of options

Returns:

  • (Sawyer::Resource)

    New Event Field

See Also:



24
25
26
# File 'lib/bugsnag/api/client/eventfields.rb', line 24

def create_event_field(project_id, display_id, path, filter_options, options = {})
  post "projects/#{project_id}/event_fields", options.merge({:display_id => display_id, :path => path, :filter_options => filter_options})
end

#delete_event_field(project_id, display_id, options = {}) ⇒ Object

Delete a custom Event Field



43
44
45
# File 'lib/bugsnag/api/client/eventfields.rb', line 43

def delete_event_field(project_id, display_id, options = {})
  boolean_from_resposne :delete, "project/#{project_id}/event_fields/#{display_id}", options
end

#event_fields(project_id, options = {}) ⇒ Array<Sawyer::Resource>

List the Event Fields for a Project

Parameters:

  • per_page (Hash)

    a customizable set of options

Returns:

  • (Array<Sawyer::Resource>)

    List of event fields

See Also:



14
15
16
# File 'lib/bugsnag/api/client/eventfields.rb', line 14

def event_fields(project_id, options = {})
  paginate "projects/#{project_id}/event_fields", options
end

#update_event_field(project_id, display_id, path, options = {}) ⇒ Sawyer::Resource

Update a custom Event Field

Parameters:

  • reindex (Hash)

    a customizable set of options

  • filter_options (Hash)

    a customizable set of options

  • pivot_options (Hash)

    a customizable set of options

Returns:

  • (Sawyer::Resource)

    Updated Event Field

See Also:



35
36
37
# File 'lib/bugsnag/api/client/eventfields.rb', line 35

def update_event_field(project_id, display_id, path, options = {})
  patch "projects/#{id}/event_fields/#{display_id}", options.merge({:display_id => display_id, :path => path})
end