muck_out.derived
ActorHeaderInfo
Bases: BaseModel
Derived information suitable to be displayed in a header line.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
id of the actor, can be assumed to be globally unique. |
required |
avatar_url
|
str | None
|
The url of the avatar to use for the actor |
None
|
name
|
str | None
|
Display name of the actor |
None
|
identifier
|
str
|
Identifier to display for the actor |
required |
html_url
|
str | None
|
Location of a html representation of the actor |
None
|
Source code in muck_out/derived/actor_header_info.py
ObjectMetaInfo
Bases: BaseModel
Derived information suitable to be displayed in a header line.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
id
|
str
|
id of the object, can be assumed to be globally unique. |
required |
html_url
|
str | None
|
Location of a html representation of the object |
None
|
published
|
datetime | None
|
Moment of this object being published |
None
|
updated
|
datetime | None
|
Moment of this object being updated |
None
|
Source code in muck_out/derived/object_meta_info.py
actor_to_header_info
actor_to_header_info(actor: Actor) -> ActorHeaderInfo
Turns an Actor object into a reduced version suitable to display in a header lien for this actor.
>>> from muck_out.testing.examples import actor
>>> result = actor_to_header_info(actor)
>>> print(result.model_dump_json(indent=2))
{
"id": "http://abel/actor/AFKb0cQunSBv1fC7sWbQYg",
"avatarUrl": "https://dev.bovine.social/assets/bull-horns.png",
"name": "The kitty",
"identifier": "acct:kitty@abel",
"htmlUrl": "http://abel/@kitty"
}