| Crates.io | nanowrimo |
| lib.rs | nanowrimo |
| version | 0.2.5 |
| created_at | 2020-11-24 03:38:31.503371+00 |
| updated_at | 2020-11-29 03:06:28.809564+00 |
| description | Access to the NanoWrimo API, in all its forms |
| homepage | |
| repository | https://github.com/craftspider/nanowrimo-rs |
| max_upload_size | |
| id | 315630 |
| size | 89,908 |
An easy-to use NanoWrimo API client for Rust
This example uses Tokio
[dependencies]
nanowrimo = "0.2"
tokio = { version = "0.2", features = ["full"] }
use nanowrimo::{NanoClient};
#[tokio::main]
async fn main() {
let client = NanoClient::new_user("username", env!("NANO_PASSWORD"))
.await
.expect("Couldn't create logged in NanoClient");
let user = client.current_user()
.await
.expect("Couldn't get current user")
.data;
let data = &user.data;
println!("User ID: {}", user.id())
println!("User Bio: {}", data.bio);
println!("Avatar: {}", data.avatar);
}
Licensed under either of
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.