Module pe4kin_receiver

Telegram bot update pooler.

Copyright © (C) 2016, Sergey Prokhorov

Behaviours: gen_server.

Authors: Sergey Prokhorov (me@seriyps.ru).

Description

Telegram bot update pooler. Receive incoming messages (updates) via webhook or http longpolling.

Function Index

code_change/3
get_updates/2Return not more than 'Limit' updates.
handle_call/3
handle_cast/2
handle_info/2
init/1
start_http_poll/2
start_link/3
start_set_webhook/3
stop_http_poll/1
stop_set_webhook/1
subscribe/2
terminate/2
unsubscribe/2
webhook_callback/3

Function Details

code_change/3

code_change(OldVsn, State, Extra) -> any()

get_updates/2

get_updates(Bot::pe4kin:bot_name(), Limit::pos_integer()) -> [pe4kin:update()]

Return not more than 'Limit' updates. May return empty list.

handle_call/3

handle_call(Request, From, State) -> any()

handle_cast/2

handle_cast(Msg, State) -> any()

handle_info/2

handle_info(Info, State) -> any()

init/1

init(X1) -> any()

start_http_poll/2

start_http_poll(Bot::pe4kin:bot_name(), Opts::#{offset => integer(), limit => 1..100, timeout => non_neg_integer()}) -> ok

start_link/3

start_link(Bot, Token, Opts) -> any()

start_set_webhook/3

start_set_webhook(Bot::pe4kin:bot_name(), UrlPrefix::binary(), Opts::#{certfile_id => integer()}) -> ok

stop_http_poll/1

stop_http_poll(Bot::pe4kin:bot_name()) -> ok

stop_set_webhook/1

stop_set_webhook(Bot::pe4kin:bot_name()) -> ok

subscribe/2

subscribe(Bot::pe4kin:bot_name(), Pid::pid()) -> ok | {error, process_already_subscribed}

terminate/2

terminate(Reason, State) -> any()

unsubscribe/2

unsubscribe(Bot::pe4kin:bot_name(), Pid::pid()) -> ok | not_found

webhook_callback/3

webhook_callback(Path::binary(), Query::#{binary() => binary()}, Body::binary()) -> ok


Generated by EDoc