A toolkit for adding Torznab APIs to programs.
Find a file
2024-12-01 18:51:35 -06:00
src async it 2024-12-01 18:51:35 -06:00
.gitignore Initial commit 2024-11-21 13:19:57 -06:00
Cargo.lock DRY and code cleanup for api.rs 2024-11-28 23:09:32 -06:00
Cargo.toml misc improvements, improve documentation, switch numeric IDs to ints, and add search() stub 2024-11-27 21:49:15 -06:00
dev-notes.md complete all search functions 2024-12-01 12:31:43 -06:00
README.md async it 2024-12-01 18:51:35 -06:00

Torznab Toolkit

A safe, multi-threaded, async toolkit for adding Torznab APIs to programs. You just focus on the indexer itself, we abstract away the hell that is the Torznab API.

Just fill in your own relevant functions and config, and torznab-toolkit will run the API for you

use torznab_toolkit;
let config: torznab_toolkit::config::Config = /* config goes here */

torznab_toolkit::run(config);

The environment variables ROCKET_ADDRESS and ROCKET_PORT specify the address and port it will run on; these currently cannot be configured any other way. See the relevant docs for details.


This program is brought to you by: metaphorical and literal truckloads of structs!

Note: I wrote the line above when I was tired. Don't ask me what literal truckloads of structs means, I don't know either.

Functionality

API call Explanation Implemented
caps Returns the capabilities of the api.
search Free text search query.
tvsearch Search query with tv specific query params and filtering.
movie Search query with movie specific query params and filtering.
music Search query with music specific query params and filtering.
book Search query with book specific query params and filtering.

(copied from torznab.github.io)

Limitations

  • Currently this does not allow for returning errors from the program using the library, such as API limits for an account.
  • Currently this does not allow for requiring authentication for caps; it's against spec (not that that's worth much), but common and perfectly fine to do.

Notes

Thanks to torznab.github.io, as it's my primary reference for this; NZBDrone's Implementing a Torznab indexer was also rather helpful.