Module: Voyager::Request

Defined in:
lib/request.rb

Class Method Summary collapse

Class Method Details

.simple_holdings_check(args = {}) ⇒ Object



3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/request.rb', line 3

def self.simple_holdings_check(args = {})
  
  con = args.delete(:connection)
  con ||= OracleConnection.new(args.delete(:connection_details))
  bibids = Array.wrap(args.delete(:bibids))
  con.retrieve_holdings(bibids)
  
  results = {}

  bibids.each do |bibid|
    results[bibid] = Collection.new(bibid: bibid, connection: con).to_hash()
  end

  return results

end