File: feed_image.py

package info (click to toggle)
python-aio-georss-client 0.12-3
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 376 kB
  • sloc: python: 2,656; xml: 513; makefile: 4
file content (24 lines) | stat: -rw-r--r-- 684 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
"""GeoRSS feed image."""
from __future__ import annotations

from ..consts import XML_TAG_HEIGHT, XML_TAG_URL, XML_TAG_WIDTH
from .feed_dict_source import FeedDictSource


class FeedImage(FeedDictSource):
    """Represents a feed image."""

    @property
    def url(self) -> str | None:
        """Return the url of this feed image."""
        return self._attribute([XML_TAG_URL])

    @property
    def height(self) -> int | None:
        """Return the height of this feed image."""
        return self._attribute([XML_TAG_HEIGHT])

    @property
    def width(self) -> int | None:
        """Return the width of this feed image."""
        return self._attribute([XML_TAG_WIDTH])