| Crates.io | rust-freely |
| lib.rs | rust-freely |
| version | 0.1.1 |
| created_at | 2024-09-01 19:42:17.623534+00 |
| updated_at | 2024-09-01 19:55:51.072527+00 |
| description | An asynchronous wrapper for the WriteFreely/Write.as API |
| homepage | https://github.com/dax-dot-gay/rust-freely |
| repository | https://github.com/dax-dot-gay/rust-freely |
| max_upload_size | |
| id | 1359847 |
| size | 49,652 |
Asynchronous Rust wrapper for the WriteFreely/Write.as API
Hosted on crates.io
To install, run:
cargo add rust-freely
use rust_freely::{Client, Auth};
async fn main() {
let mut client = Client::new("http://0.0.0.0:8080".to_string());
if let Ok(client) = Client::new("http://0.0.0.0:8080".to_string()).authenticate(Auth::Login("username".to_string(), "password".to_string())).await {
if let Ok(user) = client.user().await {
println!("{:?}", user.info());
println!("{:?}", user.posts().await);
println!("{:?}", user.collections().await);
}
}
}
Further documentation can be found on docs.rs