# `Immich.API.Client.Behaviour`

Defines the expected interface for HTTP clients used by the Immich API modules.

# `api_error`

```elixir
@type api_error() ::
  {:authentication, term()}
  | {:authorization, term()}
  | {:transport, term()}
  | {:unexpected_response, non_neg_integer(), term()}
```

# `headers`

```elixir
@type headers() :: [{String.t(), String.t()}]
```

# `get`

```elixir
@callback get(String.t(), headers()) :: {:ok, map() | term()} | {:error, api_error()}
```

# `ndjson_stream`

```elixir
@callback ndjson_stream(String.t(), map(), headers()) ::
  {:ok, Enumerable.t(map())} | {:error, api_error()}
```

# `post`

```elixir
@callback post(String.t(), map(), headers()) ::
  {:ok, map() | term()} | {:error, api_error()}
```

---

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