MilanoteUnofficialApi.elements.image

 1from .element import Element
 2from .meta import Meta
 3from .location import Location
 4
 5
 6class Image(Element):
 7    """
 8    A Milanote image element.
 9    """
10
11    id: str
12    """ID of the element."""
13    element_type: str
14    """Type of the element."""
15    meta: Meta
16    """Metadata of the element."""
17    location: Location
18    """Location of the element."""
19    url: str
20    """URL of the image."""
21
22    def __init__(self, data: dict):
23        super().__init__(data)
24        self.url = data['content']['image']['original']
25
26    def __repr__(self):
27        return f"Image(id='{self.id}')"
 7class Image(Element):
 8    """
 9    A Milanote image element.
10    """
11
12    id: str
13    """ID of the element."""
14    element_type: str
15    """Type of the element."""
16    meta: Meta
17    """Metadata of the element."""
18    location: Location
19    """Location of the element."""
20    url: str
21    """URL of the image."""
22
23    def __init__(self, data: dict):
24        super().__init__(data)
25        self.url = data['content']['image']['original']
26
27    def __repr__(self):
28        return f"Image(id='{self.id}')"

A Milanote image element.

Image(data: dict)
23    def __init__(self, data: dict):
24        super().__init__(data)
25        self.url = data['content']['image']['original']
id: str

ID of the element.

element_type: str

Type of the element.

Metadata of the element.

Location of the element.

url: str

URL of the image.