Wrap API calls in helper and validate response

This commit is contained in:
2022-10-30 19:11:07 +00:00
parent f22fcfdaaa
commit c15ae379f5
15 changed files with 224 additions and 163 deletions

View File

@@ -0,0 +1,21 @@
from pydantic import BaseModel
class DrakdooMarket(BaseModel):
exchange: str
item: str
currency: str
contract: str
class DrakdooTimestamp(BaseModel):
sent: int
trade: int
class DrakdooCallback(BaseModel):
title: str
message: str
period: str
market: DrakdooMarket
timestamp: DrakdooTimestamp