🧠 DogeAPI¶
The DogeAPI class provides a unified interface to all API endpoints in the DOGE SDK.
It wraps the lower-level client and injects SavingsAPI, and PaymentsAPI — all using a shared session and common flags.
📦 Class Reference¶
DogeAPI
¶
DogeAPI(
fetch_all: bool = False,
output_pydantic: bool = True,
handle_response: bool = True,
run_async: bool = False,
**client_kwargs
)
Unified entrypoint for interacting with all DOGE endpoints.
Attributes:
-
client(DogeAPIClient) –Shared client instance used across all endpoint classes.
-
savings(SavingsAPI) –Access to /savings endpoints.
-
payments(PaymentsAPI) –Access to /payments endpoints.
Parameters:
-
(fetch_all¶bool, default:False) –Automatically fetch all pages for paginated endpoints.
-
(output_pydantic¶bool, default:True) –If True, return Pydantic models. If False, return plain dicts with .export().
-
(handle_response¶bool, default:True) –If True, decode responses. If False, return raw httpx.Response.
-
(run_async¶bool, default:False) –If True, use asyncio-based pagination (if supported).
-
(**client_kwargs¶dict, default:{}) –Passed to DogeAPIClient (e.g. base_url, timeout, headers).
Methods:
-
close–Close the internal client session.
Source code in src/pydoge_api/api.py
19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 | |
close
¶
close()
Close the internal client session.
Source code in src/pydoge_api/api.py
52 53 54 | |