cattle_hugs ¶
object_router
module-attribute
¶
object_router = APIRouter()
Adds the API methods for the likes, replies, and shares collection. For this to work nginx needs to set the x-ap-location header, e.g.
actor_for_id
async
¶
actor_for_id(
session: AsyncSession,
fetcher: Callable[[str], Awaitable[Actor | None]]
| None,
actor_id: str,
) -> Actor
Returns the Actor as a muck_out model
Source code in cattle_hugs/public/__init__.py
db_actor_for_id
async
¶
db_actor_for_id(
session: AsyncSession,
fetcher: Callable[[str], Awaitable[Actor | None]]
| None,
actor_id: str,
) -> StoredActor
Returns the database object for the actor
Source code in cattle_hugs/public/__init__.py
register_base_object
async
¶
register_base_object(session: AsyncSession, obj: dict)
Adds an obj to be tracked
Source code in cattle_hugs/public/objects.py
retrieve_interactions
async
¶
retrieve_interactions(
session: AsyncSession, object_id: str
) -> None | Interactions
Returns the interactions
Source code in cattle_hugs/public/interactions.py
with_collections ¶
Adds the collections to the object