Stremio Addon SDK
This is an unofficial SDK for building stremio addons. If you're totally new to addon building, it's recommended to start reading the offical stremio addon SDK docs to get a basic understanding of how addons work. This SDK is meant to step up your game if you want to make use of Rust's powerfull type system and performance.
[!WARNING]
This project is in low-maintenance mode. I will still accept PRs but likely won't contribute much to the project myself.
use stremio_addon_sdk::builder::Builder;
use stremio_addon_sdk::server::{serve_http, ServerOptions};
#[tokio::main]
async fn main() {
// create manifest file using stremio-core's Manifest struct
let manifest = Manifest {
// ...
};
// build addon interface
let interface = Builder::new(manifest)
// function as parameter
.define_catalog_handler(handle_catalog)
.define_stream_handler(handle_stream)
// closure as parameter
.define_meta_handler(|resource: &ResourceRef| -> EnvFuture<ResourceResponse> {
let response = ResourceResponse::Metas { metas: vec![] };
return Box::new(future::ok(response));
})
.build();
// run HTTP server with default settings
serve_http(interface, ServerOptions::default());
}
See the example-addon for more details or take a look at the documentation.
Documentation can be found here.
47 commits
6 commits
Rust
92.3%
CSS
7.6%
Stremio Addon SDK
This is an unofficial SDK for building stremio addons. If you're totally new to addon building, it's recommended to start reading the offical stremio addon SDK docs to get a basic understanding of how addons work. This SDK is meant to step up your game if you want to make use of Rust's powerfull type system and performance.
[!WARNING]
This project is in low-maintenance mode. I will still accept PRs but likely won't contribute much to the project myself.
use stremio_addon_sdk::builder::Builder;
use stremio_addon_sdk::server::{serve_http, ServerOptions};
#[tokio::main]
async fn main() {
// create manifest file using stremio-core's Manifest struct
let manifest = Manifest {
// ...
};
// build addon interface
let interface = Builder::new(manifest)
// function as parameter
.define_catalog_handler(handle_catalog)
.define_stream_handler(handle_stream)
// closure as parameter
.define_meta_handler(|resource: &ResourceRef| -> EnvFuture<ResourceResponse> {
let response = ResourceResponse::Metas { metas: vec![] };
return Box::new(future::ok(response));
})
.build();
// run HTTP server with default settings
serve_http(interface, ServerOptions::default());
}
See the example-addon for more details or take a look at the documentation.
Documentation can be found here.
47 commits
6 commits
Rust
92.3%
CSS
7.6%