Jido.Chat.Telegram.InlineKeyboard (Jido Chat Telegram v1.0.0)

Copy Markdown View Source

Typed inline keyboard wrapper for Telegram reply_markup payloads.

Summary

Functions

Creates a typed inline keyboard from rows.

Returns the Zoi schema for InlineKeyboard.

Converts inline keyboard to Telegram reply_markup wire shape.

Types

t()

@type t() :: %Jido.Chat.Telegram.InlineKeyboard{
  rows: [
    [
      %Jido.Chat.Telegram.InlineKeyboardButton{
        callback_data: term(),
        pay: term(),
        switch_inline_query: term(),
        switch_inline_query_current_chat: term(),
        text: term(),
        url: term()
      }
    ]
  ]
}

Functions

new(attrs)

@spec new(map()) :: t()

Creates a typed inline keyboard from rows.

schema()

Returns the Zoi schema for InlineKeyboard.

to_reply_markup(keyboard)

@spec to_reply_markup(t()) :: map()

Converts inline keyboard to Telegram reply_markup wire shape.