Skip to content

NoraCodes/eggbug-rs

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

16 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

eggbug

eggbug-rs is a bot library for cohost.org, providing an interface to create, edit, and delete posts.

use eggbug::{Post, Session};

// Log in
let session = Session::login("eggbug@website.invalid", "hunter2").await?;

// Describe a post
let mut post = Post {
    headline: "hello from eggbug-rs!".into(),
    markdown: "wow it's like a website in here".into(),
    ..Default::default()
};

// Create the post on the eggbug page
let id = session.create_post("eggbug", &mut post).await?;

// Oh wait we want to make that a link
post.markdown = "wow it's [like a website in here](https://cohost.org/hthrflwrs/post/25147-empty)".into();
session.edit_post("eggbug", id, &mut post).await?;

// Good job!

License

eggbug-rs is released under the terms of the Anti-Capitalist Software License, version 1.4.

About

Bot library for cohost.org

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Rust 100.0%