bovine.activitystreams.object_factory
Object
dataclass
A dataclass representing an ActivityStreams Object
<https://www.w3.org/TR/activitystreams-vocabulary/#object-types>
_
Source code in bovine/bovine/activitystreams/object_factory.py
as_followers()
as_public()
makes the object public, i.e. public in to and followers in cc
as_unlisted()
makes the object unlisted, i.e. public in cc and followers in to
build()
Returns the resulting object as a dictionary
Source code in bovine/bovine/activitystreams/object_factory.py
ObjectFactory
ObjectFactory usually created through a BovineClient
Source code in bovine/bovine/activitystreams/object_factory.py
108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 |
|
article(**kwargs)
Creates an Article Object
event(**kwargs)
mention_for_actor_uri(actor_to_mention)
async
Creates a mention object for another actor. Requires client to be set.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
actor_to_mention |
The URI of the actor to mention |
required |
Source code in bovine/bovine/activitystreams/object_factory.py
note(**kwargs)
reply(obj, **kwargs)
Creates a reply for an object
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj |
dict
|
Object being replied to |
required |
Source code in bovine/bovine/activitystreams/object_factory.py
reply_with_mention(obj, **kwargs)
async
Creates a reply for an object, mentioning the author of the original post. This is necessary for compatibility with Mastodon
Parameters:
Name | Type | Description | Default |
---|---|---|---|
obj |
dict
|
Object being replied to |
required |