mirror of
https://github.com/Paillat-dev/flagger.git
synced 2026-01-02 09:16:22 +00:00
22 lines
552 B
Python
22 lines
552 B
Python
# Copyright (c) Paillat-dev
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
from dataclasses import dataclass
|
|
from typing import Literal
|
|
|
|
|
|
@dataclass
|
|
class Flag:
|
|
url: str
|
|
flag_pole_type: Literal["gallery"] = "gallery"
|
|
background: Literal["blue-sky", "custom"] = "custom"
|
|
backgroundcolor: str = "1a1a1e"
|
|
|
|
def to_url_params(self) -> dict[str, str]:
|
|
return {
|
|
"src": self.url,
|
|
"flagpoletype": self.flag_pole_type,
|
|
"background": self.background,
|
|
"backgroundcolor": self.backgroundcolor,
|
|
}
|