Skip to content

ActivityStreams Vocabulary Links

Provides classes representing ActivityStreams Vocabulary Link objects.

Bases: as_Base

A Link is an indirect, qualified reference to a resource identified by a URL. The fundamental model for links is established by [RFC5988]. Many of the properties defined by the Activity Vocabulary allow values that are either instances of Object or a Link. When a Link is used, it establishes a qualified relation connecting the subject to the resource identified by the href property. Properties of the Link are properties of the reference as opposed to properties of the resource. Links are disjoint from the Object type. See definition in ActivityStreams Vocabulary https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link

Source code in vultron/as_vocab/base/links.py
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
@activitystreams_link
@dataclass_json(letter_case=LetterCase.CAMEL)
@dataclass(kw_only=True)
class as_Link(as_Base):
    """A Link is an indirect, qualified reference to a resource identified by a URL.
    The fundamental model for links is established by [RFC5988].
    Many of the properties defined by the Activity Vocabulary allow values that are either instances of Object or a Link.
    When a Link is used, it establishes a qualified relation connecting the subject to the resource identified by the href property.
    Properties of the Link are properties of the reference as opposed to properties of the resource.
    Links are disjoint from the Object type.
    See definition in ActivityStreams Vocabulary <https://www.w3.org/TR/activitystreams-vocabulary/#dfn-link>
    """

    width: Optional[int] = None
    height: Optional[int] = None
    rel: Optional[str] = None
    href: Optional[str] = None
    hreflang: Optional[str] = None

as_Mention dataclass

Bases: as_Link

A Link that represents an @mention.

Source code in vultron/as_vocab/base/links.py
47
48
49
50
51
@activitystreams_link
@dataclass_json(letter_case=LetterCase.CAMEL)
@dataclass(kw_only=True)
class as_Mention(as_Link):
    """A Link that represents an @mention."""