mirror of
https://github.com/revanced/revanced-releases-api.git
synced 2025-05-02 23:24:27 +02:00

* feat: resolves #5, resolves #4 (#7) * Implements client generation and management * fix announcements endpoints * change annoucements model * bump deps * sync with main * refactor: adopt some functional standards in Releases.py * feat: add new workflows * chore: remove unused files * refactor: update build badge * refactor: move files around and delete unused ones * feat: add authentication endpoints * refactor: clean up code on Clients.py controller * fix: fix the client secret update endpoint * refactor: clean up authentication code * feat: add authentication to client endpoints * chore: bump deps * feat: add admin user generation * feature: add /changelogs endpoint (#10) * feat: move endpoints into custom routers, resolves #12 (#14) * refactor: import routers from old branch * refactor: import InternalCache removal * refactor: move routes into dedicated routers * fix: fixes entrypoint * refactor: add documentation and bump libs * docs: update description (#16) * feat: implement cdn mirrors endpoints, closes #15 (#17) * feat: add cdn mirror endpoints * refactor: change API version in docs * docs: fix titles on API docs page Co-authored-by: oSumAtrIX <johan.melkonyan1@web.de>
77 lines
2.0 KiB
Python
77 lines
2.0 KiB
Python
from typing import Any
|
|
from pydantic import BaseModel
|
|
|
|
class ToolsResponseFields(BaseModel):
|
|
"""Implements the fields for the /tools endpoint.
|
|
|
|
Args:
|
|
BaseModel (pydantic.BaseModel): BaseModel from pydantic
|
|
"""
|
|
repository: str
|
|
version: str
|
|
timestamp: str
|
|
name: str
|
|
size: str | None = None
|
|
browser_download_url: str
|
|
content_type: str
|
|
class CompatiblePackagesResponseFields(BaseModel):
|
|
"""Implements the fields for compatible packages in the PatchesResponseFields class.
|
|
|
|
Args:
|
|
BaseModel (pydantic.BaseModel): BaseModel from pydantic
|
|
"""
|
|
name: str
|
|
versions: list[ str ] | None
|
|
|
|
class PatchesOptionsResponseFields(BaseModel):
|
|
key: str
|
|
title: str
|
|
description: str
|
|
required: bool
|
|
choices: list[ Any ] | None
|
|
|
|
class PatchesResponseFields(BaseModel):
|
|
"""Implements the fields for the /patches endpoint.
|
|
|
|
Args:
|
|
BaseModel (pydantic.BaseModel): BaseModel from pydantic
|
|
"""
|
|
name: str
|
|
description: str
|
|
version: str
|
|
excluded: bool
|
|
deprecated: bool
|
|
dependencies: list[ str ] | None
|
|
options: list[ PatchesOptionsResponseFields ] | None
|
|
compatiblePackages: list[ CompatiblePackagesResponseFields ]
|
|
|
|
class ContributorFields(BaseModel):
|
|
"""Implements the fields for each contributor in the /contributors endpoint.
|
|
|
|
Args:
|
|
BaseModel (pydantic.BaseModel): BaseModel from pydantic
|
|
"""
|
|
login: str
|
|
avatar_url: str
|
|
html_url: str
|
|
|
|
class ContributorsResponseFields(BaseModel):
|
|
"""Implements the fields for each repository in the /contributors endpoint
|
|
|
|
Args:
|
|
BaseModel (pydantic.BaseModel): BaseModel from pydantic
|
|
"""
|
|
|
|
name: str
|
|
contributors: list[ ContributorFields ]
|
|
|
|
class ChangelogsResponseFields(BaseModel):
|
|
"""Implements the fields for the /changelogs endpoint.
|
|
|
|
Args:
|
|
BaseModel (pydantic.BaseModel): BaseModel from pydantic
|
|
"""
|
|
sha: str
|
|
author: str
|
|
message: str
|
|
html_url: str |