Module: Qiita::Client::Items
- Included in:
- Qiita::Client
- Defined in:
- lib/qiita/client/items.rb
Instance Method Summary collapse
- #delete_item(uuid) ⇒ Object
- #item(uuid) ⇒ Object
- #post_item(params) ⇒ Object
- #search_items(query, params) ⇒ Object
- #stock_item(uuid) ⇒ Object
- #unstock_item(uuid) ⇒ Object
- #update_item(uuid, params) ⇒ Object
Instance Method Details
#delete_item(uuid) ⇒ Object
12 13 14 |
# File 'lib/qiita/client/items.rb', line 12 def delete_item(uuid) delete "/items/#{uuid}" end |
#item(uuid) ⇒ Object
16 17 18 |
# File 'lib/qiita/client/items.rb', line 16 def item(uuid) get "/items/#{uuid}" end |
#post_item(params) ⇒ Object
4 5 6 |
# File 'lib/qiita/client/items.rb', line 4 def post_item(params) post '/items', params end |
#search_items(query, params) ⇒ Object
20 21 22 |
# File 'lib/qiita/client/items.rb', line 20 def search_items(query, params) get "/search", params.merge(:q => query) end |
#stock_item(uuid) ⇒ Object
24 25 26 |
# File 'lib/qiita/client/items.rb', line 24 def stock_item(uuid) put "/items/#{uuid}/stock" end |
#unstock_item(uuid) ⇒ Object
28 29 30 |
# File 'lib/qiita/client/items.rb', line 28 def unstock_item(uuid) delete "/items/#{uuid}/stock" end |
#update_item(uuid, params) ⇒ Object
8 9 10 |
# File 'lib/qiita/client/items.rb', line 8 def update_item(uuid, params) put "/items/#{uuid}", params end |