DomoBuzz
DomoBuzz ¶
Domo Buzz entity classes.
Wraps crew_dcs.routes.buzz (the Buzz product API — X-DOMO-Developer-Token
on https://{instance}.domo.com/api, not the deprecated api.domo.com
OAuth "Integration API").
Shapes to know before touching this module:
GET /buzz/v1/channels/mereturns a map keyed by channel id, not a list — each entry is a thinChannelMeta(unread/important counts,mentioned,channelType,lastViewedTimestamp), not a full channel. :class:DomoBuzzChannelMetamodels that shape; :class:DomoBuzzChannelmodels the richer object returned byGET /buzz/v1/channels,GET /buzz/v1/channels/{id}, andPOST /buzz/v1/topics.POST /buzz/v1/sockets/authenticateis a standard Pusher authorizer — form-urlencoded request, JSON{"auth": ...}response. See :meth:DomoBuzzChannels.authenticate_socketandroutes.buzz.authenticate_socket's docstring for the live-verified shape (an earlier "returns a bare string" claim was wrong and unverified).
DomoBuzzChannel
dataclass
¶
DomoBuzzChannel(
auth: DomoAuth,
id: str,
raw: dict = dict(),
channel_id: str | None = None,
title: str | None = None,
description: str | None = None,
channel_type: str | None = None,
locked: bool | None = None,
created: int | None = None,
created_by_id: str | None = None,
created_by_type: str | None = None,
modified: int | None = None,
modified_by_id: str | None = None,
modified_by_type: str | None = None,
last_updated: int | None = None,
permission_count: int | None = None,
pinned_count: int | None = None,
reply_count: int | None = None,
default_permission: str | None = None,
public_permission: str | None = None,
via_id: str | None = None,
via_type: str | None = None,
)
Bases: DomoEntity
A Buzz channel (topic, group chat, direct chat, or object chat).
Built from the rich channel payload returned by GET /buzz/v1/channels,
GET /buzz/v1/channels/{id}, and POST /buzz/v1/topics (nested under
response["channel"] for the latter). This is NOT the shape returned by
GET /buzz/v1/channels/me — see :class:DomoBuzzChannelMeta for that.
create
async
classmethod
¶
create(
auth: DomoAuth,
title: str,
description: str | None = None,
accesses: list[dict[str, Any]] | None = None,
default_permission: str = "INVITE_OTHERS",
public_permission: str = "INVITE_OTHERS",
filters: list[dict[str, Any]] | None = None,
pin: bool = False,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoBuzzChannel | ResponseGetData
Create a Buzz topic and return it as a :class:DomoBuzzChannel.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 | |
delete
async
¶
delete(
return_raw: bool = False,
debug_api: bool = False,
session: AsyncClient | None = None,
*,
context: RouteContext | None = None,
**context_kwargs
) -> bool | ResponseGetData
Delete this Buzz channel.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 | |
from_dict
classmethod
¶
from_dict(
auth: DomoAuth, obj: dict[str, Any]
) -> DomoBuzzChannel
Tolerant of a partial channel payload — only id is assumed.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 | |
get_by_id
async
classmethod
¶
get_by_id(
auth: DomoAuth,
channel_id: str,
debug_num_stacks_to_drop: int = 2,
debug_api: bool = False,
session: AsyncClient | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoBuzzChannel | ResponseGetData
Retrieve a Buzz channel by id.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 | |
get_entity_by_id
async
classmethod
¶
get_entity_by_id(
auth: DomoAuth,
entity_id: str,
debug_num_stacks_to_drop: int = 2,
debug_api: bool = False,
session: AsyncClient | None = None,
check_if_published: bool | None = None,
parent_auth_retrieval_fn: Any | None = None,
parent_auth: Any | None = None,
**kwargs
) -> DomoBuzzChannel
Internal wrapper used by the base refresh() method.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 | |
get_messages
async
¶
get_messages(
paging_mode: str | None = None,
paging_id: str | None = None,
paging_field: str | None = None,
paging_limit: int | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**kwargs
) -> list[DomoBuzzMessage] | ResponseGetData
Get message history for this channel.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 | |
post_message
async
¶
post_message(
content: str,
guid: str | None = None,
attachments: list[dict[str, Any]] | None = None,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoBuzzMessage | ResponseGetData
Post a message to this channel (the richer, per-channel form).
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 | |
DomoBuzzChannelMeta
dataclass
¶
DomoBuzzChannelMeta(
id: str,
raw: dict = dict(),
channel_type: str | None = None,
mentioned: bool | None = None,
last_viewed_timestamp: int | None = None,
unread_counts: dict | None = None,
important_counts: dict | None = None,
)
One entry from GET /buzz/v1/channels/me's id-keyed map.
channels/me returns {"me": {<channelId>: ChannelMeta}, "nextOffset":
N}. ChannelMeta carries no id field of its own — the id is the
map key — so :meth:from_dict takes it as a separate argument rather
than reading it out of obj.
from_dict
classmethod
¶
from_dict(
channel_id: str, obj: dict[str, Any]
) -> DomoBuzzChannelMeta
Tolerant of a partial ChannelMeta payload.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
371 372 373 374 375 376 377 378 379 380 381 382 383 | |
DomoBuzzChannels
dataclass
¶
DomoBuzzChannels(auth: DomoAuth)
Bases: DomoManager
Collection manager for Buzz channels, messages, topics, and sockets.
authenticate_socket
async
¶
authenticate_socket(
socket_id: str,
channel_name: str,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> str | ResponseGetData
Authenticate a private Pusher channel subscription.
POST /buzz/v1/sockets/authenticate is a standard Pusher
authorizer: form-urlencoded socket_id/channel_name in,
JSON {"auth": "appkey:sig"} out (see
routes.buzz.authenticate_socket's docstring for the live
finding). Returns the parsed auth string.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 | |
create_topic
async
¶
create_topic(
title: str,
description: str | None = None,
accesses: list[dict[str, Any]] | None = None,
default_permission: str = "INVITE_OTHERS",
public_permission: str = "INVITE_OTHERS",
filters: list[dict[str, Any]] | None = None,
pin: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoBuzzChannel
Create a Buzz topic.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 | |
get
async
¶
get(
offset: int | None = None,
limit: int | None = None,
loop_until_end: bool = True,
maximum: int | None = None,
debug_loop: bool = False,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[DomoBuzzChannel] | ResponseGetData
List all Buzz channels visible to the caller (GET /buzz/v1/channels).
Paginated to exhaustion by default so a caller never silently gets a
truncated page one — see :func:crew_dcs.routes.buzz.list_channels
for the loop_until_end/maximum contract.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 | |
get_by_id
async
¶
get_by_id(
channel_id: str,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoBuzzChannel
Get a single Buzz channel by id.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
612 613 614 615 616 617 618 619 620 621 622 623 624 625 | |
get_my_channels
async
¶
get_my_channels(
offset: int | None = None,
limit: int | None = None,
loop_until_end: bool = True,
maximum: int | None = None,
debug_loop: bool = False,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> list[DomoBuzzChannelMeta] | ResponseGetData
List the caller's Buzz channels (GET /buzz/v1/channels/me).
Turns the id-keyed map (response["me"]) into a list of
:class:DomoBuzzChannelMeta — one per key, across every page fetched.
Paginated to exhaustion by default so a caller never silently gets a
truncated page one — see
:func:crew_dcs.routes.buzz.list_my_channels for the
loop_until_end/maximum contract.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 | |
get_socket_config
async
¶
get_socket_config(
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> DomoBuzzSocketConfig | ResponseGetData
Get the caller's Pusher realtime configuration.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 | |
post_message
async
¶
post_message(
channel: str,
text: str,
username: str | None = None,
icon_url: str | None = None,
alert: bool = False,
return_raw: bool = False,
*,
context: RouteContext | None = None,
**context_kwargs
) -> ResponseGetData
Post a Slack-shaped incoming-webhook message (POST /buzz/v1/messages).
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 | |
DomoBuzzMessage
dataclass
¶
DomoBuzzMessage(
id: str | None,
channel_id: str | None = None,
raw: dict = dict(),
content: str | dict | None = None,
guid: str | None = None,
created: int | None = None,
created_by_id: str | None = None,
created_by_type: str | None = None,
)
A Buzz message, as returned in a channel's message history.
Live-verified on datacrew-space 2026-08-28: the wire content
field is NOT the plain string sent to create_channel_message — Domo
echoes it back wrapped as {"text": "...", "tags": [...]}. Buzz's
system messages (bot/integration posts) use a different dict shape —
{"fallback": ..., "systemTextKey": ..., "systemTitleKey": ..., "image":
..., ...}, frequently with text present but None — where the
human-readable string is fallback, not text.
:attr:content is the resolved text (or, for a dict shape that resolves
to neither text nor fallback, the raw content dict itself — never
silently None for a dict-shaped payload). The full message object is
always on :attr:raw regardless.
from_dict
classmethod
¶
from_dict(
channel_id: str | None, obj: dict[str, Any]
) -> DomoBuzzMessage
Tolerant of a partial message payload.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 | |
DomoBuzzSocketConfig
dataclass
¶
DomoBuzzSocketConfig(
raw: dict = dict(),
application_key: str | None = None,
host: str | None = None,
port: str | None = None,
ssl_port: str | None = None,
channel: str | None = None,
buzz_channel: str | None = None,
)
Pusher configuration from GET /buzz/v1/sockets/me.
from_dict
classmethod
¶
from_dict(obj: dict[str, Any]) -> DomoBuzzSocketConfig
Tolerant of a partial socket-config payload.
Source code in src/crew_dcs/classes/DomoBuzz/__init__.py
506 507 508 509 510 511 512 513 514 515 516 517 518 | |