Thanks to visit codestin.com
Credit goes to github.com

Skip to content
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ license-file = "LICENSE.md"
[dependencies]
base64 = "0.13.0"
bytes = "1.1.0"
chrono = { version = "0.4.22", default-features = false, features = ["std", "serde"] }
derive_more = { version = "0.99.17", default-features = false, features = ["display", "from", "from_str", "into"] }
futures = { version = "0.3.21", default-features = false, features = ["alloc"] }
hmac = "0.12.1"
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# eggbug

eggbug-rs is a bot library for [cohost.org](https://cohost.org/rc/welcome), providing an
interface to create, edit, and delete posts.
interface to create, read, edit, and delete posts.

```rust
use eggbug::{Post, Session};
Expand Down
20 changes: 20 additions & 0 deletions examples/get.rs
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#![deny(elided_lifetimes_in_paths)]
#![warn(clippy::pedantic)]

use anyhow::Result;
use eggbug::Client;
use tracing_subscriber::{fmt, EnvFilter};

#[tokio::main]
async fn main() -> Result<()> {
dotenv::dotenv().ok();
fmt().with_env_filter(EnvFilter::from_default_env()).init();

let project = std::env::var("COHOST_PROJECT")?;

let client = Client::new();
let posts = client.get_posts_page(&project, 0).await?;
println!("{:#?}", posts);

Ok(())
}
Loading