diff --git a/type_def/__init__.py b/type_def/__init__.py new file mode 100644 index 0000000..e69de29 diff --git a/type_def/mvw_json_request.py b/type_def/mvw_json_request.py new file mode 100644 index 0000000..f7112b5 --- /dev/null +++ b/type_def/mvw_json_request.py @@ -0,0 +1,17 @@ +from __future__ import annotations +from typing import List +from pydantic import BaseModel + + +class Query(BaseModel): + fields: List[str] + query: str + + +class MVWJSONRequest(BaseModel): + queries: List[Query] + sortBy: str + sortOrder: str + future: bool + offset: int + size: int diff --git a/type_def/mvw_json_response.py b/type_def/mvw_json_response.py new file mode 100644 index 0000000..c1a0b09 --- /dev/null +++ b/type_def/mvw_json_response.py @@ -0,0 +1,37 @@ +from __future__ import annotations +from typing import List, Optional +from pydantic import BaseModel + + +class Show(BaseModel): + channel: str + topic: str + title: str + description: str + timestamp: int + duration: int + size: int + url_website: str + url_subtitle: str + url_video: str + url_video_low: str + url_video_hd: str + filmlisteTimestamp: str + id: str + + +class QueryInfo(BaseModel): + filmlisteTimestamp: str + searchEngineTime: str + resultCount: int + totalResults: int + + +class Result(BaseModel): + results: List[Show] = [] + queryInfo: QueryInfo + + +class MVWJSONResponse(BaseModel): + result: Result + err: Optional[str] = None