Module: Bugsnag::Api::Client::Projects
- Included in:
- Bugsnag::Api::Client
- Defined in:
- lib/bugsnag/api/client/projects.rb
Overview
Methods for the Projects API
Instance Method Summary collapse
-
#create_project(org_id, name, type, options = {}) ⇒ Sawyer::Resource
Create a Project in an Organization.
-
#delete_project(id, options = {}) ⇒ Object
Delete a Project.
-
#project(id, options = {}) ⇒ Sawyer::Resource
View a Project.
-
#regenerate_api_key(id, options = {}) ⇒ Object
Regenerate a Project's notifier API key.
-
#update_project(id, options = {}) ⇒ Sawyer::Resource
Update a Project.
Instance Method Details
#create_project(org_id, name, type, options = {}) ⇒ Sawyer::Resource
Create a Project in an Organization
13 14 15 |
# File 'lib/bugsnag/api/client/projects.rb', line 13 def create_project(org_id, name, type, = {}) post "organizations/#{org_id}/projects", .merge({:name => name, :type => type}) end |
#delete_project(id, options = {}) ⇒ Object
Delete a Project
55 56 57 |
# File 'lib/bugsnag/api/client/projects.rb', line 55 def delete_project(id, = {}) boolean_from_response :delete, "projects/#{id}", end |
#project(id, options = {}) ⇒ Sawyer::Resource
View a Project
21 22 23 |
# File 'lib/bugsnag/api/client/projects.rb', line 21 def project(id, = {}) get "projects/#{id}", end |
#regenerate_api_key(id, options = {}) ⇒ Object
Regenerate a Project's notifier API key
47 48 49 |
# File 'lib/bugsnag/api/client/projects.rb', line 47 def regenerate_api_key(id, = {}) delete "projects/#{id}/api_key", end |
#update_project(id, options = {}) ⇒ Sawyer::Resource
Update a Project
39 40 41 |
# File 'lib/bugsnag/api/client/projects.rb', line 39 def update_project(id, = {}) patch "projects/#{id}", end |