File
file
¶
Dealing with file infos of the Notion API.
NOTION_HOSTED_DOMAIN = 'secure.notion-static.com'
module-attribute
¶
FileInfo(*, url: str, name: str | None = None, caption: str | None = None)
¶
Information about a web resource e.g. for the files property.
caption: Text | None
property
writable
¶
Return the caption of the file.
name: str | None
property
writable
¶
Return the name of the file.
obj_ref: objs.FileObject
instance-attribute
¶
url: str
property
writable
¶
Return the URL of this file.
__eq__(other: object) -> bool
¶
__hash__()
¶
__repr__() -> str
¶
__str__() -> str
¶
wrap_obj_ref(obj_ref: objs.FileObject) -> FileInfo
classmethod
¶
Wrap an existing low-level FileObject into a FileInfo.
is_notion_hosted(url: str) -> bool
¶
Check if the URL is hosted on Notion.