Module: Shiphawk::Api::Categories
- Defined in:
- lib/shiphawk/api/categories.rb
Overview
Categories API
The following API actions provide the CRUD interface to managing categories.
Instance Method Summary collapse
- #categories_create(options) ⇒ Object
- #categories_destroy(category_id) ⇒ Object
- #categories_index ⇒ Object
- #categories_show(category_id) ⇒ Object
- #categories_update(category_id, options) ⇒ Object
Instance Method Details
#categories_create(options) ⇒ Object
20 21 22 |
# File 'lib/shiphawk/api/categories.rb', line 20 def categories_create post_request categories_path, end |
#categories_destroy(category_id) ⇒ Object
28 29 30 |
# File 'lib/shiphawk/api/categories.rb', line 28 def categories_destroy category_id delete_request categories_path, id: category_id end |
#categories_index ⇒ Object
12 13 14 |
# File 'lib/shiphawk/api/categories.rb', line 12 def categories_index collection_request categories_path, 500 end |
#categories_show(category_id) ⇒ Object
16 17 18 |
# File 'lib/shiphawk/api/categories.rb', line 16 def categories_show category_id entity_request_with_id categories_path, category_id end |
#categories_update(category_id, options) ⇒ Object
24 25 26 |
# File 'lib/shiphawk/api/categories.rb', line 24 def categories_update category_id, put_request categories_path(category_id), end |