Module: Tinysou::Client::Collections
- Included in:
- Tinysou::Client
- Defined in:
- lib/tinysou/client/collections.rb
Overview
Methods for the Collections API
Instance Method Summary collapse
- #collection(engine, name) ⇒ Object
- #collections(engine, params = {}) ⇒ Object
- #create_collection(engine, attrs = {}) ⇒ Object
- #destroy_collection(engine, name) ⇒ Object
- #update_collection(engine, name, attrs = {}) ⇒ Object
Instance Method Details
#collection(engine, name) ⇒ Object
13 14 15 |
# File 'lib/tinysou/client/collections.rb', line 13 def collection(engine, name) get "engines/#{engine}/collections/#{name}" end |
#collections(engine, params = {}) ⇒ Object
5 6 7 |
# File 'lib/tinysou/client/collections.rb', line 5 def collections(engine, params = {}) get "engines/#{engine}/collections", params end |
#create_collection(engine, attrs = {}) ⇒ Object
9 10 11 |
# File 'lib/tinysou/client/collections.rb', line 9 def create_collection(engine, attrs = {}) post "engines/#{engine}/collections", attrs end |
#destroy_collection(engine, name) ⇒ Object
21 22 23 |
# File 'lib/tinysou/client/collections.rb', line 21 def destroy_collection(engine, name) delete "engines/#{engine}/collections/#{name}" end |
#update_collection(engine, name, attrs = {}) ⇒ Object
17 18 19 |
# File 'lib/tinysou/client/collections.rb', line 17 def update_collection(engine, name, attrs = {}) put "engines/#{engine}/collections/#{name}", attrs end |