# `Noizu.Telegram.Updates`
[🔗](https://github.com/noizu-labs-sdks/elixir-telegram/blob/v0.1.0/lib/noizu/telegram/updates.ex#L1)

Incoming update polling (`getUpdates`).

`get_updates/1` is one shot; `stream/1` walks updates continuously using
the `offset` protocol (max `update_id` + 1).

# `get_updates`

```elixir
@spec get_updates(keyword()) :: {:ok, [map()]} | {:error, Noizu.Telegram.Error.t()}
```

Bot API `getUpdates`.

Opts: `:offset` (first update id to return), `:limit` (1-100),
`:timeout` (long-poll seconds, 0 = immediate), `:allowed_updates` (list).

# `stream`

```elixir
@spec stream(keyword()) :: Enumerable.t()
```

Stream updates indefinitely: fetches with the next offset, yields each
update, and advances the offset to `update_id + 1`. Errors raise (stopping
the stream). `:limit` caps the fetch batch size.

---

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