revanced-api/api/models/socials.py
Ushie d4eac5c757
feat: use objects for /socials and /donations (#51)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-05 15:45:05 -03:00

23 lines
465 B
Python

from pydantic import BaseModel
class SocialField(BaseModel):
"""
Implements the fields for a social network link.
"""
name: str
url: str
class SocialsResponseModel(BaseModel):
"""
A Pydantic BaseModel that represents a dictionary of social links.
"""
socials: list[SocialField]
"""
A dictionary where the keys are the names of the social networks, and
the values are the links to the profiles or pages.
"""