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
-
#create_event_field(project_id, display_id, path, filter_options, options = {}) ⇒ Sawyer::Resource
Create a custom Event Field.
-
#delete_event_field(project_id, display_id, options = {}) ⇒ Object
Delete a custom Event Field.
-
#event_fields(project_id, options = {}) ⇒ Array<Sawyer::Resource>
List the Event Fields for a Project.
-
#update_event_field(project_id, display_id, path, options = {}) ⇒ Sawyer::Resource
Update a custom Event Field.
Instance Method Details
#create_event_field(project_id, display_id, path, filter_options, options = {}) ⇒ Sawyer::Resource
Create a custom Event Field
24 25 26 |
# File 'lib/bugsnag/api/client/eventfields.rb', line 24 def create_event_field(project_id, display_id, path, , = {}) post "projects/#{project_id}/event_fields", .merge({:display_id => display_id, :path => path, :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, = {}) boolean_from_resposne :delete, "project/#{project_id}/event_fields/#{display_id}", end |
#event_fields(project_id, options = {}) ⇒ Array<Sawyer::Resource>
List the Event Fields for a Project
14 15 16 |
# File 'lib/bugsnag/api/client/eventfields.rb', line 14 def event_fields(project_id, = {}) paginate "projects/#{project_id}/event_fields", end |
#update_event_field(project_id, display_id, path, options = {}) ⇒ Sawyer::Resource
Update a custom Event Field
35 36 37 |
# File 'lib/bugsnag/api/client/eventfields.rb', line 35 def update_event_field(project_id, display_id, path, = {}) patch "projects/#{id}/event_fields/#{display_id}", .merge({:display_id => display_id, :path => path}) end |