Module: DPN::Client::Agent::Digest
- Included in:
- DPN::Client::Agent
- Defined in:
- lib/dpn/client/agent/digest.rb
Overview
Operations on the digest resource.
Instance Method Summary collapse
-
#bag_digests(bag, options = {page_size: 25}) {|Response| ... } ⇒ Object
Get the digests for a specific bag.
-
#create_digest(digest) {|Response| ... } ⇒ Response
Create a digest.
-
#digest(bag, algorithm) {|Response| ... } ⇒ Response
Get a specific digest.
-
#digests(options = {page_size: 25}) {|Response| ... } ⇒ Object
Get the digests index.
Instance Method Details
#bag_digests(bag, options = {page_size: 25}) {|Response| ... } ⇒ Object
Get the digests for a specific bag
33 34 35 |
# File 'lib/dpn/client/agent/digest.rb', line 33 def bag_digests(bag, = {page_size: 25}, &block) paginate_each "/bag/#{bag}/digest/", , [:page_size], &block end |
#create_digest(digest) {|Response| ... } ⇒ Response
Create a digest
52 53 54 |
# File 'lib/dpn/client/agent/digest.rb', line 52 def create_digest(digest, &block) post "/bag/#{digest[:bag]}/digest/", digest, &block end |
#digest(bag, algorithm) {|Response| ... } ⇒ Response
Get a specific digest
43 44 45 |
# File 'lib/dpn/client/agent/digest.rb', line 43 def digest(bag, algorithm, &block) get "/bag/#{bag}/digest/#{algorithm}/", nil, &block end |
#digests(options = {page_size: 25}) {|Response| ... } ⇒ Object
Get the digests index
21 22 23 |
# File 'lib/dpn/client/agent/digest.rb', line 21 def digests( = {page_size: 25}, &block) paginate_each "/digest/", , [:page_size], &block end |