txts-rs

Crates.iotxts-rs
lib.rstxts-rs
version0.1.1
sourcesrc
created_at2023-08-29 23:23:17.471293
updated_at2023-08-29 23:23:17.471293
descriptionRust library for interacting with txts
homepagehttps://github.com/txts-team/txts.rs
repositoryhttps://github.com/txts-team/txts.rs
max_upload_size
id958521
size14,694
uh wot (uhwot)

documentation

README

txts.rs

Rust library for interacting with txts

Examples

Initializing client

let host = Url::parse("https://txts.sudokoko.xyz/").unwrap();
let client = TxtsClient::new(host)?;

Getting page info

let page = client.get("username").await?;
println!("Verified: {}", page.verified);
println!("HTML: {}", page.html_content);

Getting page content in markdown

let markdown = client.get_markdown("username").await?;

Creating page

let (page, secret) = client.create("username", "content").await?;

Editing page

let secret = Uuid::parse_str("Secret here").unwrap();
let edited_page = client.edit("username", &secret, "content").await?;
Commit count: 2

cargo fmt