What an adapter builds: the platform's ops, its descriptor and, when the platform has one, its native stream.
Attributes#
| Attribute | Type | Description |
|---|---|---|
descriptor | Descriptor | |
native_stream | NativeStream | None |
Functions#
post#
post(thread, *, markdown, reply_to=None, files=(), actions=()) -> Effect[Posted, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread | |
markdown | str | |
reply_to | ReplyTo | None = None | |
files | Sequence[File] = () | |
actions | Sequence[Action] = () |
Returns Effect[Posted, ChatError]
def post(
self,
thread: ChatThread,
*,
markdown: str,
reply_to: ReplyTo | None = None,
files: Sequence[File] = (),
actions: Sequence[Action] = (),
) -> Effect[Posted, ChatError]: ...edit#
edit(thread, message_id, *, markdown, actions=()) -> Effect[None, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread | |
message_id | str | |
markdown | str | |
actions | Sequence[Action] = () |
Returns Effect[None, ChatError]
def edit(
self, thread: ChatThread, message_id: str, *, markdown: str, actions: Sequence[Action] = ()
) -> Effect[None, ChatError]: ...delete#
delete(thread, message_id) -> Effect[None, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread | |
message_id | str |
Returns Effect[None, ChatError]
def delete(self, thread: ChatThread, message_id: str) -> Effect[None, ChatError]: ...fetch_message#
fetch_message(thread, message_id) -> Effect[ChatMessage, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread | |
message_id | str |
Returns Effect[ChatMessage, ChatError]
def fetch_message(
self, thread: ChatThread, message_id: str
) -> Effect[ChatMessage, ChatError]: ...history#
history(thread, *, direction, from_=None) -> Stream[ChatMessage, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread | |
direction | Direction | |
from_ | str | None = None |
Returns Stream[ChatMessage, ChatError]
def history(
self, thread: ChatThread, *, direction: Direction, from_: str | None = None
) -> Stream[ChatMessage, ChatError]: ...download#
download(thread, attachment, *, max_bytes) -> Stream[bytes, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread | |
attachment | Attachment | |
max_bytes | int |
Returns Stream[bytes, ChatError]
def download(
self, thread: ChatThread, attachment: Attachment, *, max_bytes: int
) -> Stream[bytes, ChatError]: ...start_thread#
start_thread(thread, message_id, *, name=None) -> Effect[ChatThread, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread | |
message_id | str | |
name | str | None = None |
Returns Effect[ChatThread, ChatError]
def start_thread(
self, thread: ChatThread, message_id: str, *, name: str | None = None
) -> Effect[ChatThread, ChatError]: ...get_thread#
get_thread(thread) -> Effect[ThreadInfo, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread |
Returns Effect[ThreadInfo, ChatError]
def get_thread(self, thread: ChatThread) -> Effect[ThreadInfo, ChatError]: ...opener#
opener(thread) -> Effect[ChatMessage | None, ChatError]| Parameter | Type | Description |
|---|---|---|
thread | ChatThread |
Returns Effect[ChatMessage | None, ChatError]
def opener(self, thread: ChatThread) -> Effect[ChatMessage | None, ChatError]: ...get_user#
get_user(id, *, in_=None) -> Effect[User, ChatError]| Parameter | Type | Description |
|---|---|---|
id | str | |
in_ | ChatThread | None = None |
Returns Effect[User, ChatError]
def get_user(self, id: str, *, in_: ChatThread | None = None) -> Effect[User, ChatError]: ...follow_up#
follow_up(deferred, *, markdown, actions=()) -> Effect[None, ChatError]| Parameter | Type | Description |
|---|---|---|
deferred | Defer | |
markdown | str | |
actions | Sequence[Action] = () |
Returns Effect[None, ChatError]
def follow_up(
self, deferred: Defer, *, markdown: str, actions: Sequence[Action] = ()
) -> Effect[None, ChatError]: ...