Messages
Source code in src/cocalc_api/hub.py
552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | |
get(limit=None, offset=None, type=None)
Get your messages.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
limit
|
Optional[int]
|
Maximum number of messages to return. |
None
|
offset
|
Optional[int]
|
Number of messages to skip. |
None
|
type
|
Optional[Literal]
|
Filter by message type. |
None
|
Returns:
| Type | Description |
|---|---|
list[MessageType]
|
list[MessageType]: List of messages. |
Source code in src/cocalc_api/hub.py
573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 | |
send(subject, body, to_ids, reply_id=None)
Send a message to one or more users.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
subject
|
str
|
Short plain text subject of the message. |
required |
body
|
str
|
Longer markdown body of the message (math typesetting and cocalc links work). |
required |
to_ids
|
list[str]
|
Email addresses or account_id of each recipient. |
required |
reply_id
|
Optional[int]
|
Optional message you're replying to (for threading). |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
int |
int
|
ID of the message. |
Source code in src/cocalc_api/hub.py
557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 | |