Module: DPN::Client::Agent::Ingest

Included in:
DPN::Client::Agent
Defined in:
lib/dpn/client/agent/ingest.rb

Overview

Operations on the ingest resource.

Instance Method Summary collapse

Instance Method Details

#create_ingest(ingest) {|Response| ... } ⇒ Response

Create a ingest

Parameters:

  • ingest (Hash)

    Body of the ingest

Yields:

Returns:



34
35
36
# File 'lib/dpn/client/agent/ingest.rb', line 34

def create_ingest(ingest, &block)
  post "/ingest/", ingest, &block
end

#ingests(options = {page_size: 25}) {|Response| ... } ⇒ Object

Get the ingest index

Parameters:

  • options (Hash) (defaults to: {page_size: 25})

Options Hash (options):

  • :page_size (Fixnum) — default: 25

    Number of results per page

  • :before (DateTime String) — default: nil

    Include only entries last modified before this date.

  • :after (DateTime String) — default: nil

    Include only entries last modified after this date.

  • bag (String) — default: nil

    Filter by a specific bag’s UUID.

  • latest (Boolean) — default: false

    Request latest results only.

  • ingested (Boolean) — default: nil

    Filter by value of the ingested field.

  • :node (String) — default: nil

    Namespace of the node.

Yields:

  • (Response)

    Block to process each individual result.



25
26
27
# File 'lib/dpn/client/agent/ingest.rb', line 25

def ingests(options = {page_size: 25}, &block)
  paginate_each "/ingest/", options, options[:page_size], &block
end