Module: BaseApi::Client::Categories
- Included in:
- BaseApi::Client
- Defined in:
- lib/base_api/client/categories.rb
Instance Method Summary collapse
- #categories(&block) ⇒ HTTParty::Response
- #categories_add(name, option = {}, &block) ⇒ HTTParty::Response
- #categories_delete(category_id, &block) ⇒ HTTParty::Response
- #categories_edit(category_id, option = {}, &block) ⇒ HTTParty::Response
Instance Method Details
#categories(&block) ⇒ HTTParty::Response
6 7 8 |
# File 'lib/base_api/client/categories.rb', line 6 def categories(&block) call_get_api('/1/categories', &block) end |
#categories_add(name, option = {}, &block) ⇒ HTTParty::Response
14 15 16 |
# File 'lib/base_api/client/categories.rb', line 14 def categories_add(name, option = {}, &block) call_post_api('/1/categories/add', { name: name }.merge(option), &block) end |
#categories_delete(category_id, &block) ⇒ HTTParty::Response
29 30 31 |
# File 'lib/base_api/client/categories.rb', line 29 def categories_delete(category_id, &block) call_post_api('/1/categories/delete', { category_id: category_id }, &block) end |
#categories_edit(category_id, option = {}, &block) ⇒ HTTParty::Response
22 23 24 |
# File 'lib/base_api/client/categories.rb', line 22 def categories_edit(category_id, option = {}, &block) call_post_api('/1/categories/edit', { category_id: category_id }.merge(option), &block) end |