class Stremio::Addon::DevKit::MultiBlockHandler

Overview

Crystal, by design, does not support passing multiple blocks so, we fake it by creating a method, which will capture a block

Defined in:

stremio-addon-devkit/multi_block_handler.cr

Instance Method Summary

Macro Summary

Instance Method Detail

def catalog_movie(&handler : HTTP::Server::Context, CatalogMovieRequest -> Union(CatalogMovieResponse, Nil)) #

our setter By allowing the use of a block, it gives the user more flexibility regarding the parameters they decide to use and the return value


[View source]
def catalog_movie #

our getter Throws a TypeCastError if it was not set


[View source]
def catalog_movie? #

Our check to see if the handler is set


[View source]
def manifest(&handler : HTTP::Server::Context, ManifestRequest -> Union(ManifestResponse, Nil)) #

our setter By allowing the use of a block, it gives the user more flexibility regarding the parameters they decide to use and the return value


[View source]
def manifest #

our getter Throws a TypeCastError if it was not set


[View source]
def manifest? #

Our check to see if the handler is set


[View source]

Macro Detail

macro define_handler(name, request_type, response_type) #

[View source]