class Stremio::Addon::DevKit::ManifestHandler
- Stremio::Addon::DevKit::ManifestHandler
- Stremio::Addon::DevKit::StremioRouteHandler
- Stremio::Addon::DevKit::RouteHandler
- Reference
- Object
Defined in:
stremio-addon-devkit/manifest_handler.crInstance Method Summary
- #bind(manifest, &)
-
#route_catalogs(manifest, &handler : HTTP::Server::Context, CatalogMovieRequest -> CatalogMovieResponse | Nil)
Assigns all manifest.catalogs objects with
&handler
. - #route_manifest(manifest, &handler : HTTP::Server::Context, ManifestRequest -> ManifestResponse | Nil)
Instance methods inherited from class Stremio::Addon::DevKit::StremioRouteHandler
add_route(method : String, path : String, &handler : HTTP::Server::Context -> _)
add_route
Class methods inherited from class Stremio::Addon::DevKit::StremioRouteHandler
encode(path : String) : String
encode
Instance methods inherited from class Stremio::Addon::DevKit::RouteHandler
add_route(method : String, path : String, &handler : HTTP::Server::Context -> _)
add_route,
call(context : HTTP::Server::Context)
call,
delete(path : String, &block : HTTP::Server::Context -> _)
delete,
get(path : String, &block : HTTP::Server::Context -> _)
get,
lookup_route(verb : String, path : String)
lookup_route,
options(path : String, &block : HTTP::Server::Context -> _)
options,
patch(path : String, &block : HTTP::Server::Context -> _)
patch,
post(path : String, &block : HTTP::Server::Context -> _)
post,
put(path : String, &block : HTTP::Server::Context -> _)
put
Constructor methods inherited from class Stremio::Addon::DevKit::RouteHandler
new
new
Class methods inherited from class Stremio::Addon::DevKit::RouteHandler
redirect(env : HTTP::Server::Context, url : String, status_code : Int32 = 302, *, body : String | Nil = nil, close : Bool = true)
redirect
Instance Method Detail
def route_catalogs(manifest, &handler : HTTP::Server::Context, CatalogMovieRequest -> CatalogMovieResponse | Nil)
#
Assigns all manifest.catalogs objects with &handler
.
If &handler
returns a CatalogMovieResponse, this response will be serialized
in such a way that Stremio Clients can understand it (ie: proper headers will be set)
If &handler
returns nil
, this means that the callback will provide
the response
def route_manifest(manifest, &handler : HTTP::Server::Context, ManifestRequest -> ManifestResponse | Nil)
#