# `IDUtils.Schemes.VIAF`
[🔗](https://github.com/moefuerst/id_utils/blob/v0.1.0/lib/id_utils/schemes/viaf.ex#L1)

VIAF (Virtual International Authority File) scheme.

See https://www.wikidata.org/wiki/Property:P214

# `build_uri`

Builds a URI for the given VIAF ID.

## Examples

    iex> IDUtils.Schemes.VIAF.build_uri("238999862")
    {:ok, %URI{scheme: "https", host: "viaf.org", path: "/viaf/238999862", port: 443}}

# `match?`

Checks whether a string is a VIAF ID.

## Examples

    iex> IDUtils.Schemes.VIAF.match?("http://viaf.org/viaf/9972147907520779210008")
    true

    iex> IDUtils.Schemes.VIAF.match?("24609378")
    true

    iex> IDUtils.Schemes.VIAF.match?("not-a-viaf-id")
    false

# `normalize`

Normalizes a VIAF ID.

## Examples

    iex> IDUtils.Schemes.VIAF.normalize("http://viaf.org/viaf/2736702")
    {:ok, "2736702"}

    iex> IDUtils.Schemes.VIAF.normalize("VIAF:70596852")
    {:ok, "70596852"}

    iex> IDUtils.Schemes.VIAF.normalize("not-a-viaf-id")
    {:error, :invalid_identifier}

# `prefix?`

```elixir
@spec prefix?(binary()) :: boolean()
```

Checks whether a string starts with a VIAF prefix.

## Examples

    iex> IDUtils.Schemes.VIAF.prefix?("http://viaf.org/viaf/24609378")
    true

    iex> IDUtils.Schemes.VIAF.prefix?("viaf:24609378")
    true

    iex> IDUtils.Schemes.VIAF.prefix?("24609378")
    false

---

*Consult [api-reference.md](api-reference.md) for complete listing*
