Http
Table of Contents
Section titled “Table of Contents”syncopate.http
Section titled “syncopate.http”aiohttp-based HTTP client for the Syncopate REST API.
HTTPClient Objects
Section titled “HTTPClient Objects”class HTTPClient()HTTP client for the Syncopate REST API.
Handles Bot token authentication, JSON serialization,
and error mapping to :class:HTTPError.
async def close() -> NoneClose the underlying HTTP session.
async def get(path: str, *, params: dict[str, str] | None = None) -> dict[str, Any]Make a GET request.
async def post(path: str, *, json: dict[str, object] | None = None, extra_headers: dict[str, str] | None = None) -> dict[str, Any]Make a POST request.
async def patch(path: str, *, json: dict[str, object] | None = None) -> dict[str, Any]Make a PATCH request.
delete
Section titled “delete”async def delete(path: str) -> NoneMake a DELETE request.