Authoritex

BuildCoverageHex.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
  ]

# Authoritex uses httpoison_retry https://github.com/mgwidmann/httpoison_retry
# Override the config in your application if needed
config :httpoison_retry,
  max_attempts: 3,
  wait: 1_000,
  retry_unknown_errors: false

Usage

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

Implementing Additional Authorities

Testing using mocks

See Authoritex.Mock

Supported Elixir/OTP versions

Authoritex supports (i.e., is tested against) a matrix consisting of the three most recent Elixir minor versions and up to three most recent Erlang/OTP major versions (depending on Elixir compatibility). Right now, that means:

Elixir/OTP 24 23 22
1.12 ✔️ ✔️ ✔️
1.11 ✔️ ✔️ ✔️
1.10 ✔️ ✔️

Support for other versions/combinations is possible (probable, even), but unsupported.

Contributing

Issues and Pull Requests are always welcome!