Release v2

This commit is contained in:
2026-07-16 02:12:29 -03:00
parent 6f98163632
commit 76cbd799ce
47 changed files with 2409 additions and 2810 deletions
+29
View File
@@ -0,0 +1,29 @@
from pydantic import BaseModel, Field
from nyekiapi.lib.integrations import Profile
class ProfileSchema(BaseModel):
id: str = Field(
..., description="The unique identifier of the profile at the source."
)
url: str = Field(..., description="The URL of the profile at the source.")
name: str = Field(..., description="The display name of the profile at the source.")
username: str = Field(..., description="The username of the profile at the source.")
avatar_url: str = Field(
..., description="The avatar URL of the profile at the source."
)
banner_url: str | None = Field(
None, description="The banner URL of the profile at the source."
)
@classmethod
def from_integration(cls, profile: Profile) -> "ProfileSchema":
return cls(
id=profile.id,
url=profile.url,
name=profile.name,
username=profile.username,
avatar_url=profile.avatar_url,
banner_url=profile.banner_url,
)