GhostPost
Documentation for eth_defi.vault_report.ghost.GhostPost Python class.
- class GhostPost
Bases:
objectSubset of Ghost post fields we use.
Parsed from both the Content API and the Admin API, which return the same post object shape; see the Admin API posts reference.
Attributes summary
Ghost object id
Post title
URL slug
draft,scheduledorpublishedPost body, when requested with
formats=htmlPublication time, naive UTC
Last update timestamp as returned by Ghost, kept as the raw string: Ghost requires it back unchanged on an update to detect a concurrent edit, and
DraftRecordcompares it by string equalityPost excerpt
Feature image URL
Methods summary
- id: str
Ghost object id
- title: str
Post title
- slug: str
URL slug
- status: str
draft,scheduledorpublished
- html: Optional[str]
Post body, when requested with
formats=html
- published_at: Optional[datetime.datetime]
Publication time, naive UTC
- updated_at: Optional[str]
Last update timestamp as returned by Ghost, kept as the raw string: Ghost requires it back unchanged on an update to detect a concurrent edit, and
DraftRecordcompares it by string equality
- custom_excerpt: Optional[str]
Post excerpt
- feature_image: Optional[str]
Feature image URL
- static from_api(data)
Parse a post from a Ghost API response.
- Parameters
data (dict) – One entry of the
postslist.- Returns
Parsed post.
- Return type
- __init__(id, title, slug, status, html, published_at, updated_at, custom_excerpt=None, feature_image=None)