Models
Models will be switched to Pydantic models prior to 1.0 release.
Models (Shared across services)
This is a temporary implementation. A shim-layer to be replaced by Pydantic models pre version 1.0. See: https://docs.pydantic.dev/latest/
Attachment
Stand-In for a future Attachment Model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Discord Attachment id |
required |
url
|
str
|
URL to attachment |
required |
filename
|
str
|
Attachment filename |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in services/transceiver/src/transceiver/models.py
mapping()
Future proofing this class.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary respresentation |
Channel
Stand-In for a future Channel Model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Discord Channel id |
required |
server_id
|
str
|
Discord Server id |
required |
name
|
str
|
Channel name |
required |
parse
|
int
|
Allow processing messages from channel. 0 or 1. |
required |
response
|
int
|
Allow responding to channel. 0 or 1. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in services/transceiver/src/transceiver/models.py
mapping()
Future proofing this class.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary respresentation |
Source code in services/transceiver/src/transceiver/models.py
Message
Stand-In for a future Message Model.
Source code in services/transceiver/src/transceiver/models.py
mapping()
Future proofing this class.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary respresentation |
Server
Stand-In for a future Server Model.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Discord Server id |
required |
name
|
str
|
Channel name |
required |
parse
|
int
|
Allow processing messages from channel. 0 or 1. |
required |
response
|
int
|
Allow responding to channel. 0 or 1. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in services/transceiver/src/transceiver/models.py
mapping()
Future proofing this class.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary respresentation |
Source code in services/transceiver/src/transceiver/models.py
User
Stand-In for a future User Model
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
id
|
str
|
Discord User id |
required |
name
|
str
|
Username |
required |
parse
|
int
|
Allow processing messages from user. 0 or 1. |
required |
response
|
int
|
Allow responding to user. 0 or 1. |
required |
Returns:
| Type | Description |
|---|---|
|
None |
Source code in services/transceiver/src/transceiver/models.py
mapping()
Future proofing this class.
Returns:
| Type | Description |
|---|---|
dict[str, Any]
|
dict[str, Any]: Dictionary respresentation |