module Turnir::Client::NuumPolling

Extended Modules

Defined in:

turnir/client/nuum_client.cr

Constant Summary

CHAT_URL = "https://nuum.ru/api/v3/chats?contentType={{type}}&contentId={{id}}"
EVENTS_URL = "https://nuum.ru/api/v3/events/{{chat_id}}/events"
HEADERS = HTTP::Headers {"Origin" => "https://nuum.ru", "Accept" => "application/json", "Content-Type" => "application/json"}
LAST_TS_PER_CHAT = {} of String => String
PUBLIC_CHANNEL_URL = "https://nuum.ru/api/v2/broadcasts/public?channel_name={{channel}}"
SUBSCRIBED_CHATS = Set(String).new

Instance Method Summary

Instance Method Detail

def fetch_events(chat_id : String) #

[View source]
def get_chat_id(channel_name : String) : Int32 | Nil #

[View source]
def log(msg : String) #

[View source]
def start(sync_channel : Channel(Nil), storage : Turnir::ChatStorage::Storage, channels_map : Hash(String, String)) #

[View source]
def stop #

[View source]
def subscribe_to_channel(channel_name : String) #

[View source]