| Crates.io | discourse-api-rs |
| lib.rs | discourse-api-rs |
| version | 20260125.0.0 |
| created_at | 2026-01-25 18:28:07.565248+00 |
| updated_at | 2026-01-25 18:28:07.565248+00 |
| description | Rust client for the Discourse API |
| homepage | |
| repository | https://github.com/ducks/discourse-api-rs |
| max_upload_size | |
| id | 2069248 |
| size | 81,685 |
Rust client library for the Discourse API.
[dependencies]
discourse-api = "0.20251116"
use discourse_api::DiscourseClient;
#[tokio::main]
async fn main() -> Result<(), Box<dyn std::error::Error>> {
let client = DiscourseClient::new("https://meta.discourse.org");
let topics = client.get_latest().await?;
for topic in topics.topics {
println!("{}", topic.title);
}
Ok(())
}
let client = DiscourseClient::with_api_key(
"https://your-forum.com",
"your-api-key",
"your-username"
);
let topics = client.get_latest().await?;
Run the example:
cargo run --example fetch_latest
get_latest() - Get latest topicsget_categories() - Get all categoriesget_topic(id) - Get topic with postsget_post(id) - Get individual postget_category_topics(category_id) - Get topics in categoryMIT