app/services/external_apis/re3data_service.rb
def fetch
        xml_list = query_re3data
        return [] unless xml_list.present?

        xml_list.xpath("/list/repository/id").each do |node|
          next unless node.present? && node.text.present?

          xml = query_re3data_repository(repo_id: node.text)
          next unless xml.present?

          process_repository(id: node.text, node: xml.xpath("//r3d:re3data//r3d:repository").first)
        end
      end
# Retrieves the full list of repositories from the re3data API as XML.
# For example:
#   <list>
#     <repository>
#       <id>r3d100000001</id>
#       <name>Odum Institute Archive Dataverse</name>
#       <link href="/api/v1/repository/r3d100000001" rel="self"/>
#     </repository>
#   </list>
Retrieves the full list of repositories from the re3data API as XML.
For example:


r3d100000001
Odum Institute Archive Dataverse



Retrieves the full list of repositories from the re3data API as XML . For example : r3d100000001 Odum Institute Archive Dataverse
def fetch
        xml_list = query_re3data
        return [] unless xml_list.present?
        xml_list.xpath("/list/repository/id").each do |node|
          next unless node.present? && node.text.present?
          xml = query_re3data_repository(repo_id: node.text)
          next unless xml.present?
          process_repository(id: node.text, node: xml.xpath("//r3d:re3data//r3d:repository").first)
        end
      end
def fetch xml_list = query_re3data return [ ] unless xml_list . present? xml_list . xpath ( "/list/repository/id" ) . each do | node | next unless node . present? && node . text . present? xml = query_re3data_repository ( repo_id : node . text ) next unless xml . present? process_repository ( id : node . text , node : xml . xpath ( "//r3d:re3data//r3d:repository" ) . first ) end end
Retrieves the full list of repositories from the re3data API as XML.
Retrieves the full list of repositories from the re3data API as XML .