lib/dcl_wc_metadata_api.rb
# Handle success or failure for each API call
Handle success or failure for each API call
Handle success or failure for each API call
def manage_record_result(id, result)
      if @client.is_success?
        @response_data.root << result.at_xpath(RECORD_XPATH,
          "marc" => XMLNS_MARC
        )
        @response_status << id + ": " + PAST_TENSE[@cmd] + "\n"
        puts id + ": " + PAST_TENSE[@cmd] if @global_opts[:verbose]
        @successes += 1
      else
        @response_status << id + ": failed\n"
        @response_status << result.to_s
        puts id + ": failed" if @global_opts[:verbose]
        @failures += 1
      end
    end
def manage_record_result ( id , result ) if @client . is_success? @response_data . root << result . at_xpath ( RECORD_XPATH , "marc" => XMLNS_MARC ) @response_status << id + ": " + PAST_TENSE [ @cmd ] + "\n" puts id + ": " + PAST_TENSE [ @cmd ] if @global_opts [ :verbose ] @successes += 1 else @response_status << id + ": failed\n" @response_status << result . to_s puts id + ": failed" if @global_opts [ :verbose ] @failures += 1 end end
Handle success or failure for each API call
Handle success or failure for each API call
id
<not_specific>
result
<not_specific>