rust-freely

Crates.iorust-freely
lib.rsrust-freely
version0.1.1
sourcesrc
created_at2024-09-01 19:42:17.623534
updated_at2024-09-01 19:55:51.072527
descriptionAn asynchronous wrapper for the WriteFreely/Write.as API
homepagehttps://github.com/dax-dot-gay/rust-freely
repositoryhttps://github.com/dax-dot-gay/rust-freely
max_upload_size
id1359847
size49,652
Dax Harris (dax-dot-gay)

documentation

README

rust-freely

Asynchronous Rust wrapper for the WriteFreely/Write.as API

Installation

Hosted on crates.io

To install, run:

cargo add rust-freely

Usage

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);
        }
    }
}

Documentation

Further documentation can be found on docs.rs

Commit count: 0

cargo fmt