Skip to content

cattle_hugs.types

CommentInfo

Bases: BaseModel

Information about the comment

Parameters:

Name Type Description Default
data dict
required
Source code in cattle_hugs/types.py
class CommentInfo(BaseModel):
    """Information about the comment"""

    data: dict

InteractionInfo

Bases: BaseModel

Information about the interaction

Parameters:

Name Type Description Default
interaction_type InteractionType
required
data dict
required
Source code in cattle_hugs/types.py
class InteractionInfo(BaseModel):
    """Information about the interaction"""

    interaction_type: InteractionType
    data: dict

InteractionType

Bases: StrEnum

The possible types of an interaction

Source code in cattle_hugs/types.py
class InteractionType(StrEnum):
    """The possible types of an interaction"""

    share = auto()
    like = auto()
    emoji_reaction = auto()

Interactions

Bases: BaseModel

The Interactions

Parameters:

Name Type Description Default
object_id str

The object that was interacted with

required
actors list[Actor]

Information about actors participating in the interactions

required
comments list[CommentInfo]

All comments made to the base object

required
interactions list[InteractionInfo]

Interactions, e.g likes, of the base object

required
Source code in cattle_hugs/types.py
class Interactions(BaseModel):
    """The Interactions"""

    object_id: str = Field(description="The object that was interacted with")
    actors: list[Actor] = Field(
        description="Information about actors participating in the interactions"
    )
    comments: list[CommentInfo] = Field(
        description="All comments made to the base object"
    )
    interactions: list[InteractionInfo] = Field(
        description="Interactions, e.g likes, of the base object"
    )