telegram_bot_api_util (telegram_bot_api v3.0.0)

View Source

Summary

Functions

get_ip()

-spec get_ip() -> {ok, binary()} | {error, term()}.

Request a public IP address via site http://ifconfig.me/ip

get_ip(InterfaceName)

-spec get_ip(InterfaceName :: string()) -> {ok, binary()} | {error, term()}.

Get ip address

Examples:

    {ok,<<"1.1.1.1">>}=telegram_bot_api_util:get_ip("ens3").

json_decode(Bin)

-spec json_decode(Bin :: binary()) -> map().

json_encode(Map)

-spec json_encode(Map :: dynamic()) -> binary().