Crates.io | wanisabi-model |
lib.rs | wanisabi-model |
version | 0.1.2 |
source | src |
created_at | 2024-01-31 17:09:32.76075 |
updated_at | 2024-02-09 12:13:38.000511 |
description | Model for wanisabi |
homepage | https://github.com/jemsurfer/wanisabi |
repository | https://github.com/jemsurfer/wanisabi/tree/main/wanisabi-model |
max_upload_size | |
id | 1121981 |
size | 13,345 |
An API wrapper for the wanikani API written in rust.
#[tokio::main]
async fn main() -> Result<(), wanisabi::Error> {
let client = Client::new("<WANIKANI_API_KEY>");
let params = vec![
AssignmentsFilter::ImmediatelyAvailableForLessons,
];
let assignments = client.get_assignments_filtered(params).await?;
}
Note that Client::default()
attempts to retreive the API key from the WANIKANI_API_KEY environment variable.