mirror of
https://github.com/ReVanced/revanced-api.git
synced 2026-01-18 08:53:57 +00:00
feat: API Fixes and Adjustments (#23)
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
1273f9224b
commit
b18097e030
@@ -1,4 +1,5 @@
|
||||
from pydantic import BaseModel
|
||||
from api.models.github import ContributorsFields
|
||||
|
||||
|
||||
class ToolsResponseFields(BaseModel):
|
||||
@@ -25,3 +26,24 @@ class ToolsResponseModel(BaseModel):
|
||||
"""
|
||||
|
||||
tools: list[ToolsResponseFields]
|
||||
|
||||
|
||||
class ContributorsResponseFields(BaseModel):
|
||||
"""Implements the fields for the /contributors endpoint.
|
||||
|
||||
Args:
|
||||
BaseModel (pydantic.BaseModel): BaseModel from pydantic
|
||||
"""
|
||||
|
||||
name: str
|
||||
contributors: list[ContributorsFields]
|
||||
|
||||
|
||||
class ContributorsResponseModel(BaseModel):
|
||||
"""Implements the JSON response model for the /contributors endpoint.
|
||||
|
||||
Args:
|
||||
BaseModel (pydantic.BaseModel): BaseModel from pydantic
|
||||
"""
|
||||
|
||||
repositories: list[ContributorsResponseFields]
|
||||
|
||||
@@ -1,13 +1,18 @@
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class DonationFields(BaseModel):
|
||||
"""
|
||||
A Pydantic BaseModel that represents all the donation links and wallets.
|
||||
"""
|
||||
|
||||
wallets: dict[str, str]
|
||||
links: dict[str, str]
|
||||
|
||||
|
||||
class DonationsResponseModel(BaseModel):
|
||||
"""
|
||||
A Pydantic BaseModel that represents a dictionary of donation links.
|
||||
"""
|
||||
|
||||
donations: dict[str, str]
|
||||
"""
|
||||
A dictionary where the keys are the names of the donation destinations, and
|
||||
the values are the links to services or wallet addresses.
|
||||
"""
|
||||
donations: DonationFields
|
||||
|
||||
@@ -117,6 +117,7 @@ class TeamMemberFields(BaseModel):
|
||||
login: str
|
||||
avatar_url: str
|
||||
html_url: str
|
||||
bio: Optional[str]
|
||||
|
||||
|
||||
class TeamMembersModel(BaseModel):
|
||||
|
||||
Reference in New Issue
Block a user