Crates.io | txts-rs |
lib.rs | txts-rs |
version | 0.1.1 |
source | src |
created_at | 2023-08-29 23:23:17.471293 |
updated_at | 2023-08-29 23:23:17.471293 |
description | Rust library for interacting with txts |
homepage | https://github.com/txts-team/txts.rs |
repository | https://github.com/txts-team/txts.rs |
max_upload_size | |
id | 958521 |
size | 14,694 |
Rust library for interacting with txts
let host = Url::parse("https://txts.sudokoko.xyz/").unwrap();
let client = TxtsClient::new(host)?;
let page = client.get("username").await?;
println!("Verified: {}", page.verified);
println!("HTML: {}", page.html_content);
let markdown = client.get_markdown("username").await?;
let (page, secret) = client.create("username", "content").await?;
let secret = Uuid::parse_str("Secret here").unwrap();
let edited_page = client.edit("username", &secret, "content").await?;