Card Class
Base class for rich cards that can be sent to a user as an Attachment.
Each concrete card implements to_attachment to wrap itself in an attachment using its own content type. to_message builds on that to produce a ready-to-send message activity.
Constructor
pydantic model Card
Methods
| to_attachment |
Creates a new Attachment that wraps this card. |
| to_message |
Creates a new message activity that includes this card as an attachment. |
to_attachment
Creates a new Attachment that wraps this card.
abstract to_attachment() -> Attachment
Returns
| Type | Description |
|---|---|
|
The generated attachment. |
to_message
Creates a new message activity that includes this card as an attachment.
to_message() -> Activity
Returns
| Type | Description |
|---|---|
|
An Activity representing a message activity with the card attached. |