View Source ExGram.Cast (ex_gram v0.54.0)

Helper module to convert plain values returned from Telegram to ExGram models.

Summary

Functions

Converts the given plain value to ExGram models.

Functions

Converts the given plain value to ExGram models.

iex> ExGram.Cast.cast(%{message_id: 3, chat: %{id: 5}}, ExGram.Model.Message) %ExGram.Model.Message{message_id: 3, chat: %ExGram.Model.Chat{id: 5}}