class CollectionViewPageBlock(CollectionViewBlock): """ Full Page Collection View Block. """ _type = "collection_view_page" icon = prefixed_field_map("format.page_icon") cover = prefixed_field_map("format.page_cover")
class EmbedBlock(MediaBlock): """ Embed Block. """ _type = "embed" _str_fields = "source" display_source = prefixed_field_map("format.display_source") source = prefixed_property_map("source") height = field_map("format.block_height") width = field_map("format.block_width") full_width = field_map("format.block_full_width") page_width = field_map("format.block_page_width") def set_source_url(self, url: str): self.source = remove_signed_prefix_as_needed(url) self.display_source = get_embed_link(self.source, self._client)
class EmbedBlock(MediaBlock): """ Embed Block. """ _type = "embed" _str_fields = "source" # TODO: why this exists? is it the same as `source`? display_source = prefixed_field_map("format.display_source") source = prefixed_property_map("source") height = field_map("format.block_height") width = field_map("format.block_width") full_width = field_map("format.block_full_width") page_width = field_map("format.block_page_width") def set_source_url(self, url): self.source = remove_signed_prefix_as_needed(url) self.display_source = get_embed_link(self.source)
class PageBlock(BasicBlock): _type = "page" icon = prefixed_field_map("format.page_icon") cover = prefixed_field_map("format.page_cover")