File
file
¶
File and emoji objects for the Notion API.
NOTION_HOSTED_DOMAIN = 'secure.notion-static.com'
module-attribute
¶
Emoji(emoji: str)
¶
Emoji object which behaves like str.
obj_ref = objs.EmojiObject.build(emoji)
instance-attribute
¶
__eq__(other: object) -> bool
¶
__hash__()
¶
__repr__() -> str
¶
__str__() -> str
¶
from_code(shortcode: str) -> Emoji
classmethod
¶
Create an Emoji object from a :shortcode:, e.g.
to_code() -> str
¶
Represent the emoji as :shortcode:, e.g.
FileInfo(*, url: str, name: str | None = None, caption: str | None = None)
¶
Information about a web resource e.g. for the files property.
is_notion_hosted(url: str) -> bool
¶
Check if the URL is hosted on Notion.
wrap_icon(icon_obj: objs.FileObject | objs.EmojiObject) -> FileInfo | Emoji
¶
Wrap the icon object into the corresponding class.