Module: BWAPI::Client::Projects::Categories
- Included in:
- BWAPI::Client::Projects
- Defined in:
- lib/bwapi/client/projects/categories.rb
Overview
Categories module for projects/categories endpoints
Instance Method Summary collapse
-
#categories(project_id, opts = {}) ⇒ Hashie::Mash
Get all categories in project.
-
#create_category(project_id, opts = {}) ⇒ Hashie::Mash
Create a new category in project.
-
#delete_category(project_id, category_id) ⇒ Hashie::Mash
Delete and existing category in project.
-
#update_category(project_id, category_id, opts = {}) ⇒ Hashie::Mash
Update an existing category in project.
Instance Method Details
#categories(project_id, opts = {}) ⇒ Hashie::Mash
Get all categories in project
14 15 16 |
# File 'lib/bwapi/client/projects/categories.rb', line 14 def categories(project_id, opts = {}) get "projects/#{project_id}/categories", opts end |
#create_category(project_id, opts = {}) ⇒ Hashie::Mash
Create a new category in project
27 28 29 |
# File 'lib/bwapi/client/projects/categories.rb', line 27 def create_category(project_id, opts = {}) post "projects/#{project_id}/categories", opts end |
#delete_category(project_id, category_id) ⇒ Hashie::Mash
Delete and existing category in project
50 51 52 |
# File 'lib/bwapi/client/projects/categories.rb', line 50 def delete_category(project_id, category_id) delete "projects/#{project_id}/categories/#{category_id}" end |
#update_category(project_id, category_id, opts = {}) ⇒ Hashie::Mash
Update an existing category in project
41 42 43 |
# File 'lib/bwapi/client/projects/categories.rb', line 41 def update_category(project_id, category_id, opts = {}) put "projects/#{project_id}/categories/#{category_id}", opts end |