fediverse_pasture.types
fediverse_pasture.types
MessageModifier = Callable[[dict], dict]
module-attribute
Used to add the variable content to an activity pub message. The intended usage can be seen in the ActivitySender.init_create_note method.
ApplicationAdapterForActor
dataclass
Basic type that is used to describe how to interact with an external application. actor_uri represents the actor a message will be sent to.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
actor_uri
|
str
|
The actor uri |
required |
application_name
|
str
|
The name the application will be displayed as |
required |
Source code in fediverse_pasture/types.py
ApplicationAdapterForLastActivity
dataclass
Basic type that is used to describe how to interact with an external application. actor_uri represents the actor a message will be sent to. fetch_activity is used to fetch this activity.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
actor_uri
|
str
|
The actor uri |
required |
application_name
|
str
|
The name the application will be displayed as |
required |
fetch_activity
|
Callable[list, Awaitable[Optional[dict]]]
|
coroutine that retrieves the activity with a specified published date. |
required |
Source code in fediverse_pasture/types.py
Message
dataclass
Class to track messages
Parameters:
Name | Type | Description | Default |
---|---|---|---|
steps
|
List[str]
|
a log of strings |
<dynamic>
|
Source code in fediverse_pasture/types.py
response
property
Returns a dictionary with a single key “steps” containing the steps