Crates.io | titdb |
lib.rs | titdb |
version | 0.1.0 |
source | src |
created_at | 2024-05-03 14:20:18.576946 |
updated_at | 2024-05-03 14:20:18.576946 |
description | A simple library to make use of the Trails in the Database API |
homepage | |
repository | https://github.com/vbaenal/titdb |
max_upload_size | |
id | 1228843 |
size | 17,566 |
titdb is a library that calls Trails in the Database's API. It also includes a script randomizer as an optional feature.
[dependencies]
titdb = { version = "0.1", features = ["rand"] }
use titdb::rand::SceneRandomizer;
#[tokio::main]
async fn main() -> Result<()> {
// Get 500 characters of Trails from Zero
let characters = get_chr_detail(Some(4), None, None, None, Some(500))
.await
.unwrap();
// Randomize any script from any game with characters from the previous list
let random_scene: SceneRandomizer = SceneRandomizer::new(Some(characters), None, None);
let scene = random_scene.randomize().await;
println!(scene.unwrap());
Ok(())
}