module Turnir::Webserver

Extended Modules

Defined in:

turnir/webserver.cr

Constant Summary

ClientTypes = {"vkvideo" => Turnir::Client::ClientType::VK, "twitch" => Turnir::Client::ClientType::TWITCH, "nuum" => Turnir::Client::ClientType::NUUM, "goodgame" => Turnir::Client::ClientType::GOODGAME}
URL_MAP = {/^\/v2\/turnir-api\/chat_messages$/ => ->get_chat_messages(HTTP::Server::Context), /^\/v2\/turnir-api\/chat_messages\/clear$/ => ->clear_messages(HTTP::Server::Context), /^\/v2\/turnir-api\/chat_connect$/ => ->connect_to_chat(HTTP::Server::Context), /^\/v2\/turnir-api\/presets$/ => ->save_preset(HTTP::Server::Context), /^\/v2\/turnir-api\/presets\/(.+)$/ => ->get_or_update_preset(HTTP::Server::Context), /^\/v2\/turnir-api\/version$/ => ->get_version(HTTP::Server::Context)}

Instance Method Summary

Instance Method Detail

def clear_messages(context : HTTP::Server::Context) #

[View source]
def connect_to_chat(context : HTTP::Server::Context) #

[View source]
def gen_random_id(size = 8) #

[View source]
def get_chat_messages(context : HTTP::Server::Context) #

[View source]
def get_or_update_preset(context : HTTP::Server::Context) #

[View source]
def get_preset(context : HTTP::Server::Context) #

[View source]
def get_session_id(context : HTTP::Server::Context) #

[View source]
def get_version(context : HTTP::Server::Context) #

[View source]
def log(msg) #

[View source]
def save_preset(context : HTTP::Server::Context) #

[View source]
def start #

[View source]
def update_preset(context : HTTP::Server::Context) #

[View source]