feat(rp5): add rp5 api

This commit is contained in:
2026-09-02 00:37:12 +03:00
parent d6487facf4
commit 76d7fa93f0
9 changed files with 1142 additions and 10 deletions
+2 -2
View File
@@ -2,7 +2,7 @@ from pathlib import Path
from typing import TypeVar
from gallery.sketch.api import Api, S
from gallery.sketch.source import DEFAULT_REQUEST_MODE, ApiSource, RequestMode
from gallery.sketch.source import ApiSource
class MockSource(ApiSource):
@@ -12,7 +12,7 @@ class MockSource(ApiSource):
self._path = path
self._mapping = mapping
async def request(self, endpoint: str, /, mode: RequestMode = DEFAULT_REQUEST_MODE) -> str:
async def request(self, endpoint: str, /, **kwargs) -> str:
for pattern, filename in self._mapping.items():
if pattern in endpoint:
return (self._path / filename).read_text()