# `ExIbge.Locality.UrbanAgglomeration`
[🔗](https://github.com/pedrohfonseca81/ex_ibge/blob/main/lib/ex_ibge/locality/urban_agglomeration.ex#L1)

Module for handling Urban Agglomeration (Aglomeração Urbana) queries from IBGE.

This module provides functions to fetch Urban Agglomerations.

# `all`

```elixir
@spec all(Keyword.t()) ::
  {:ok, [ExIbge.Geography.UrbanAgglomeration.t()]} | {:error, any()}
```

Get all urban agglomerations.

## Parameters

  * `query` - Optional parameters supported by the API (e.g., `order_by: :name`, `municipality: 2611101`).

## Examples

    iex> ExIbge.Locality.UrbanAgglomeration.all()
    {:ok, [%ExIbge.Geography.UrbanAgglomeration{id: "00301", name: "Aglomeração Urbana de Franca", ...}, ...]}

## See Also

[IBGE API: Aglomerações Urbanas](https://servicodados.ibge.gov.br/api/docs/localidades#api-Aglomeracoes_urbanas-aglomeracoes-urbanasGet)

# `all!`

```elixir
@spec all!(Keyword.t()) :: [ExIbge.Geography.UrbanAgglomeration.t()]
```

Same as `all/1`, but raises an error on failure.

## Examples

    iex> ExIbge.Locality.UrbanAgglomeration.all!()
    [%ExIbge.Geography.UrbanAgglomeration{id: "00301", name: "Aglomeração Urbana de Franca", ...}, ...]

# `find`

```elixir
@spec find(integer() | String.t() | [integer() | String.t()], Keyword.t()) ::
  {:ok, [ExIbge.Geography.UrbanAgglomeration.t()]} | {:error, any()}
```

Get urban agglomeration(s) by identifier(s).

## Parameters

  * `ids` - A single integer ID or a list of integer IDs.
  * `query` - Optional parameters supported by the API.

## Examples

    iex> ExIbge.Locality.UrbanAgglomeration.find("00301")
    {:ok, [%ExIbge.Geography.UrbanAgglomeration{id: "00301", name: "Aglomeração Urbana de Franca", ...}]}

## See Also

[IBGE API: Aglomeração Urbana por ID](https://servicodados.ibge.gov.br/api/docs/localidades#api-Aglomeracoes_urbanas-aglomeracoes-urbanasAglomeracaoUrbanaGet)

# `find!`

```elixir
@spec find!(integer() | String.t() | [integer() | String.t()], Keyword.t()) :: [
  ExIbge.Geography.UrbanAgglomeration.t()
]
```

Same as `find/2`, but raises an error on failure.

## Examples

    iex> ExIbge.Locality.UrbanAgglomeration.find!("00301")
    [%ExIbge.Geography.UrbanAgglomeration{id: "00301", name: "Aglomeração Urbana de Franca", ...}]

---

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