Module: DPN::Client::Agent::Bag
- Included in:
- DPN::Client::Agent
- Defined in:
- lib/dpn/client/agent/bag.rb
Instance Method Summary collapse
-
#bag(uuid) {|Response| ... } ⇒ Response
Get a specific bag.
-
#bags(options = {page_size: 25}) {|Response| ... } ⇒ Object
Get the bags index.
-
#create_bag(bag) {|Response| ... } ⇒ Response
Create a bag.
-
#delete_bag(uuid) {|Response| ... } ⇒ Response
Delete a bag.
-
#update_bag(bag) {|Response| ... } ⇒ Response
Update a bag.
Instance Method Details
#bag(uuid) {|Response| ... } ⇒ Response
Get a specific bag
38 39 40 |
# File 'lib/dpn/client/agent/bag.rb', line 38 def bag(uuid, &block) get "/bag/#{uuid}/", nil, &block end |
#bags(options = {page_size: 25}) {|Response| ... } ⇒ Object
Get the bags index
29 30 31 |
# File 'lib/dpn/client/agent/bag.rb', line 29 def bags( = {page_size: 25}, &block) paginate_each "/bag/", , [:page_size], &block end |
#create_bag(bag) {|Response| ... } ⇒ Response
Create a bag
47 48 49 |
# File 'lib/dpn/client/agent/bag.rb', line 47 def create_bag(bag, &block) post "/bag/", bag, &block end |
#delete_bag(uuid) {|Response| ... } ⇒ Response
Delete a bag
65 66 67 |
# File 'lib/dpn/client/agent/bag.rb', line 65 def delete_bag(uuid, &block) delete "/bag/#{uuid}/", &block end |
#update_bag(bag) {|Response| ... } ⇒ Response
Update a bag
56 57 58 |
# File 'lib/dpn/client/agent/bag.rb', line 56 def update_bag(bag, &block) put "/bag/#{bag[:uuid]}/", bag, &block end |