Skip to content

schemas

Monzo API 'feed' related schemas.

MonzoBasicFeedItem

Bases: BaseModel

API schema for a 'basic feed item' object.

Note

Monzo API docs: https://docs.monzo.com/#feed-items

Attributes:

Name Type Description
title str

The title to display.

image_url HttpUrl

URL of the image to display. This will be displayed as an icon in the feed, and on the expanded page if no url has been provided.

body str

The body text of the feed item.

background_color Optional[str]

Hex value for the background colour of the feed item in the format #RRGGBB. Defaults to standard app colours (ie. white background).

title_color Optional[str]

Hex value for the colour of the title text in the format #RRGGBB. Defaults to standard app colours.

body_color Optional[str]

Hex value for the colour of the body text in the format #RRGGBB. Defaults to standard app colours.

Source code in pymonzo/feed/schemas.py
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
class MonzoBasicFeedItem(BaseModel):
    """API schema for a 'basic feed item' object.

    Note:
        Monzo API docs: https://docs.monzo.com/#feed-items

    Attributes:
        title: The title to display.
        image_url: URL of the image to display. This will be displayed as an icon
            in the feed, and on the expanded page if no url has been provided.
        body: The body text of the feed item.
        background_color: Hex value for the background colour of the feed item in the
            format #RRGGBB. Defaults to standard app colours (ie. white background).
        title_color: Hex value for the colour of the title text in the format #RRGGBB.
            Defaults to standard app colours.
        body_color: Hex value for the colour of the body text in the format #RRGGBB.
            Defaults to standard app colours.
    """

    model_config = ConfigDict(extra="allow")

    title: str
    image_url: HttpUrl
    body: str
    background_color: Optional[str] = None
    title_color: Optional[str] = None
    body_color: Optional[str] = None