Expand description
Post model for Ghost API.
Represents a post/article in Ghost with all its associated metadata, content, and relationships.
§Example
use ghost_io_api::models::post::{Post, PostStatus};
// Typically posts come from API responses
let post = Post {
id: "5ddc9141c35e7700383b2937".to_string(),
uuid: Some("a5aa9bd8-ea31-415c-b452-3040dae1e730".to_string()),
title: "Welcome".to_string(),
slug: "welcome-short".to_string(),
status: PostStatus::Published,
visibility: Some("public".to_string()),
created_at: Some("2019-11-26T02:43:13.000Z".to_string()),
updated_at: Some("2019-11-26T02:44:17.000Z".to_string()),
published_at: Some("2019-11-26T02:44:17.000Z".to_string()),
// ... other fields
..Default::default()
};
assert_eq!(post.status, PostStatus::Published);
assert!(post.is_published());Structs§
- Post
- A Ghost post/article.
Enums§
- Post
Status - Status of a Ghost post.