Expand description
§ghost-io-api
A strongly-typed, async Rust client for the Ghost CMS Content API.
§Modules
auth— API key types and validationclient— HTTP clients for each Ghost APIerror—GhostErrorenum andResultaliasmodels— serde-annotated structs for every Ghost resourceparams— fluent query-parameter builders
§Quick start
use ghost_io_api::auth::content::ContentApiKey;
use ghost_io_api::client::content::{BrowsePostsParams, GhostContentClient};
use ghost_io_api::error::Result;
#[tokio::main]
async fn main() -> Result<()> {
let key = ContentApiKey::new("22444f78447824223cefc48062")?;
let client = GhostContentClient::new("https://demo.ghost.io", key)?;
let response = client.browse_posts(BrowsePostsParams::default()).await?;
for post in &response.posts {
println!("{} — {}", post.title, post.slug);
}
Ok(())
}