Skip to content

Asynchronous Rust wrapper for the WriteFreely/Write.as API

License

Notifications You must be signed in to change notification settings

dax-dot-gay/rust-freely

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Asynchronous Rust wrapper for the WriteFreely/Write.as API

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages