torbox-core-rs 0.1.0

Rust SDK Core for the torbox API
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
use std::env;

use dotenvy::from_filename;

mod user;
mod webdownload;

pub fn load_token_from_file() -> Option<String> {
    if let Err(err) = from_filename(".token") {
        eprintln!(
            "Could not load .token file, please create one before starting unit testing: {err}"
        );
        return None;
    }
    env::var("TORBOX_TOKEN").ok()
}