MCPcopy Create free account
hub / github.com/slackapi/python-slack-sdk / VideoBlock

Class VideoBlock

slack_sdk/models/blocks/blocks.py:621–715  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

619
620
621class VideoBlock(Block):
622 type = "video"
623 title_max_length = 200
624 author_name_max_length = 50
625
626 @property
627 def attributes(self) -> Set[str]: # type: ignore[override]
628 return super().attributes.union(
629 {
630 "alt_text",
631 "video_url",
632 "thumbnail_url",
633 "title",
634 "title_url",
635 "description",
636 "provider_icon_url",
637 "provider_name",
638 "author_name",
639 }
640 )
641
642 def __init__(
643 self,
644 *,
645 block_id: Optional[str] = None,
646 alt_text: Optional[str] = None,
647 video_url: Optional[str] = None,
648 thumbnail_url: Optional[str] = None,
649 title: Optional[Union[str, dict, PlainTextObject]] = None,
650 title_url: Optional[str] = None,
651 description: Optional[Union[str, dict, PlainTextObject]] = None,
652 provider_icon_url: Optional[str] = None,
653 provider_name: Optional[str] = None,
654 author_name: Optional[str] = None,
655 **others: dict,
656 ):
657 """A video block is designed to embed videos in all app surfaces
658 (e.g. link unfurls, messages, modals, App Home) —
659 anywhere you can put blocks! To use the video block within your app,
660 you must have the links.embed:write scope.
661 https://docs.slack.dev/reference/block-kit/blocks/video-block
662
663 Args:
664 block_id: A string acting as a unique identifier for a block. If not specified, one will be generated.
665 Maximum length for this field is 255 characters.
666 block_id should be unique for each message and each iteration of a message.
667 If a message is updated, use a new block_id.
668 alt_text (required): A tooltip for the video. Required for accessibility
669 video_url (required): The URL to be embedded. Must match any existing unfurl domains within the app
670 and point to a HTTPS URL.
671 thumbnail_url (required): The thumbnail image URL
672 title (required): Video title in plain text format. Must be less than 200 characters.
673 title_url: Hyperlink for the title text. Must correspond to the non-embeddable URL for the video.
674 Must go to an HTTPS URL.
675 description: Description for video in plain text format.
676 provider_icon_url: Icon for the video provider - ex. Youtube icon
677 provider_name: The originating application or domain of the video ex. Youtube
678 author_name: Author name to be displayed. Must be less than 50 characters.

Callers 6

test_documentMethod · 0.90
test_requiredMethod · 0.90
test_required_errorMethod · 0.90
test_title_length_199Method · 0.90
test_title_length_200Method · 0.90
parseMethod · 0.85

Calls

no outgoing calls

Tested by 5

test_documentMethod · 0.72
test_requiredMethod · 0.72
test_required_errorMethod · 0.72
test_title_length_199Method · 0.72
test_title_length_200Method · 0.72