2022-01-13 09:29:58 -07:00
|
|
|
from dataclasses import dataclass
|
|
|
|
|
from datetime import datetime
|
|
|
|
|
from typing import List, Optional
|
2021-11-01 16:42:52 -06:00
|
|
|
|
|
|
|
|
|
2022-01-13 09:29:58 -07:00
|
|
|
@dataclass
|
2021-11-01 16:42:52 -06:00
|
|
|
class ArchiveDict:
|
2022-01-13 09:29:58 -07:00
|
|
|
id: int
|
|
|
|
|
url_id: int
|
|
|
|
|
domain_id: int
|
|
|
|
|
singlefile_path: str
|
|
|
|
|
readability_path: str
|
|
|
|
|
readability_json_path: str
|
|
|
|
|
readability_txt_path: str
|
|
|
|
|
screenshot_path: str
|
|
|
|
|
title: str
|
|
|
|
|
archive_datetime: datetime
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@dataclass
|
2021-11-01 16:42:52 -06:00
|
|
|
class DomainDict:
|
2022-01-13 09:29:58 -07:00
|
|
|
id: int
|
|
|
|
|
domain: str
|
2021-11-01 16:42:52 -06:00
|
|
|
|
|
|
|
|
|
2022-01-13 09:29:58 -07:00
|
|
|
@dataclass
|
2021-12-31 20:14:14 -07:00
|
|
|
class ArchiveSearchRequest:
|
2022-01-13 09:29:58 -07:00
|
|
|
search_str: Optional[str] = None
|
|
|
|
|
domain: Optional[str] = None
|
|
|
|
|
offset: Optional[int] = None
|
|
|
|
|
limit: Optional[int] = None
|
2022-08-06 05:22:07 +00:00
|
|
|
order_by: Optional[str] = None
|
2021-12-31 20:14:14 -07:00
|
|
|
|
|
|
|
|
|
2022-01-13 09:29:58 -07:00
|
|
|
@dataclass
|
2021-12-31 20:14:14 -07:00
|
|
|
class ArchiveSearchResponse:
|
2022-01-13 09:29:58 -07:00
|
|
|
videos: List[ArchiveDict]
|
|
|
|
|
totals: dict
|