require 'biburi/version'

module BibURI
  # Returns a list of all drivers.
  def self.drivers
    return BibURI::Driver::drivers
  end

  # Query all the drivers in the order
  # they are recorded in; return the results
  # for the first driver.
  def self.lookup(id)
    self.drivers.each do |driver|
      if driver.supported?(id) then
        bibtex = driver.lookup(id)  
        return bibtex unless bibtex.nil?
      end
    end

    return nil
  end
end

require 'biburi/driver'
