revanced-api/api/models/socials.py
Ushie 9bbd056c1b
feat: info endpoint (#71)
Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
2023-08-19 22:35:09 +03:00

23 lines
467 B
Python

from pydantic import BaseModel
class SocialFields(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[SocialFields]
"""
A dictionary where the keys are the names of the social networks, and
the values are the links to the profiles or pages.
"""