Vibe.Gateway.Telegram (vibe v0.2.0)

Copy Markdown View Source

Convenience API for starting the Telegram gateway backend.

The generic gateway runtime and supervisor remain backend-neutral; this module provides a small Telegram-specific entrypoint for CLI and future server config surfaces.

Summary

Functions

Returns Telegram Bot API getMe for the configured token.

Runs one short getUpdates request for diagnostics.

Returns current Telegram polling diagnostics when the polling transport is running.

Starts a foreground Telegram polling gateway under Vibe's top-level supervisor.

Stops the foreground Telegram polling gateway when it is running.

Returns Telegram Bot API webhook info for the configured token.

Functions

get_me(opts \\ [])

@spec get_me(keyword()) :: {:ok, term()} | {:error, term()}

Returns Telegram Bot API getMe for the configured token.

get_updates_once(opts \\ [])

@spec get_updates_once(keyword()) :: {:ok, term()} | {:error, term()}

Runs one short getUpdates request for diagnostics.

polling_status()

@spec polling_status() :: {:ok, map()} | {:error, :not_running}

Returns current Telegram polling diagnostics when the polling transport is running.

start_polling(opts \\ [])

@spec start_polling(keyword()) :: Supervisor.on_start_child()

Starts a foreground Telegram polling gateway under Vibe's top-level supervisor.

stop_polling()

@spec stop_polling() :: :ok | {:error, term()}

Stops the foreground Telegram polling gateway when it is running.

webhook_info(opts \\ [])

@spec webhook_info(keyword()) :: {:ok, term()} | {:error, term()}

Returns Telegram Bot API webhook info for the configured token.