Authoritex

Build Coverage Hex.pm

An Elixir library for searching and fetching controlled vocabulary authority terms, inspired by the Samvera Community's Questioning Authority.

Installation

Add authoritex to your list of dependencies in mix.exs:

def deps do
  [
    {:authoritex, "~> 0.1.0"}
  ]
end

Configuration

Activate modules for the authorities you want to have available by configuring them in config/config.exs:

# To activate all 
config :authoritex,
  authorities: [
    Authoritex.FAST.CorporateName,
    Authoritex.FAST.EventName,
    Authoritex.FAST.Form,
    Authoritex.FAST.Geographic,
    Authoritex.FAST.Personal,
    Authoritex.FAST.Topical,
    Authoritex.FAST.UniformTitle,
    Authoritex.FAST,
    Authoritex.GeoNames,
    Authoritex.Getty.AAT,
    Authoritex.Getty.TGN,
    Authoritex.Getty.ULAN,
    Authoritex.Getty,
    Authoritex.LOC.Languages,
    Authoritex.LOC.Names,
    Authoritex.LOC.SubjectHeadings,
    Authoritex.LOC
  ]

Usage

See Authoritex.authorities/0, Authoritex.search/2, Authoritex.search/3, and Authoritex.fetch/1.

Implementing Additional Authorities

  • Create a module implementing the Authoritex behaviour
  • Create a test module using the Authoritex.TestCase module
  • Authoritex uses ExVCR to cache HTTP requests in the test suite. If you're seeing unexpected results during development, run mix vcr.delete CODE_ (where CODE is your authority module's unique short code) to clear that authority's cached results

Contributing

Issues and Pull Requests are always welcome!