2023-02-16 14:56:28 +01:00
|
|
|
from typing import List, Union
|
2023-06-22 13:17:53 +02:00
|
|
|
|
2022-12-20 17:07:48 +01:00
|
|
|
from pydantic import BaseModel
|
|
|
|
|
2023-02-16 15:33:06 +01:00
|
|
|
|
2022-12-20 17:07:48 +01:00
|
|
|
class Photo(BaseModel):
|
|
|
|
id: str
|
|
|
|
album: str
|
|
|
|
hash: str
|
|
|
|
filename: str
|
|
|
|
|
2023-03-12 14:59:13 +01:00
|
|
|
|
2023-02-16 14:55:03 +01:00
|
|
|
class PhotoPublic(BaseModel):
|
|
|
|
id: str
|
|
|
|
caption: str
|
|
|
|
filename: str
|
|
|
|
|
2023-03-12 14:59:13 +01:00
|
|
|
|
2023-02-16 14:11:29 +01:00
|
|
|
class PhotoSearch(BaseModel):
|
|
|
|
id: str
|
|
|
|
filename: str
|
|
|
|
caption: Union[str, None]
|
|
|
|
|
2023-02-16 15:33:06 +01:00
|
|
|
|
2022-12-20 23:59:35 +01:00
|
|
|
class Video(BaseModel):
|
|
|
|
id: str
|
|
|
|
album: str
|
|
|
|
hash: str
|
|
|
|
filename: str
|
|
|
|
|
2023-03-12 14:59:13 +01:00
|
|
|
|
2023-02-16 15:33:06 +01:00
|
|
|
class VideoPublic(BaseModel):
|
|
|
|
id: str
|
|
|
|
caption: str
|
|
|
|
filename: str
|
|
|
|
|
2023-03-12 14:59:13 +01:00
|
|
|
|
2023-02-16 14:11:29 +01:00
|
|
|
class VideoSearch(BaseModel):
|
|
|
|
id: str
|
|
|
|
filename: str
|
|
|
|
caption: Union[str, None]
|
|
|
|
|
2023-02-16 15:33:06 +01:00
|
|
|
|
2022-12-20 17:07:48 +01:00
|
|
|
class Album(BaseModel):
|
|
|
|
id: str
|
|
|
|
name: str
|
|
|
|
title: str
|
|
|
|
|
2023-03-12 14:59:13 +01:00
|
|
|
|
2023-02-16 14:11:29 +01:00
|
|
|
class AlbumSearch(BaseModel):
|
|
|
|
id: str
|
|
|
|
name: str
|
|
|
|
title: str
|
|
|
|
|
2023-03-12 14:59:13 +01:00
|
|
|
|
2022-12-20 17:07:48 +01:00
|
|
|
class AlbumModified(BaseModel):
|
|
|
|
name: str
|
|
|
|
title: str
|
2023-02-16 14:11:29 +01:00
|
|
|
cover: Union[str, None]
|
|
|
|
|
2023-02-16 15:33:06 +01:00
|
|
|
|
2023-02-16 14:11:29 +01:00
|
|
|
class SearchResultsAlbum(BaseModel):
|
|
|
|
results: List[Album]
|
|
|
|
next_page: Union[str, None]
|
|
|
|
|
2023-03-12 14:59:13 +01:00
|
|
|
|
2023-02-16 14:11:29 +01:00
|
|
|
class SearchResultsPhoto(BaseModel):
|
|
|
|
results: List[PhotoSearch]
|
|
|
|
next_page: Union[str, None]
|
2022-12-20 17:07:48 +01:00
|
|
|
|
2023-03-12 14:59:13 +01:00
|
|
|
|
2023-02-16 14:11:29 +01:00
|
|
|
class SearchResultsVideo(BaseModel):
|
|
|
|
results: List[VideoSearch]
|
2023-03-12 14:59:13 +01:00
|
|
|
next_page: Union[str, None]
|
2023-06-27 13:51:18 +02:00
|
|
|
|
|
|
|
|
|
|
|
class RandomSearchResultsPhoto(BaseModel):
|
|
|
|
results: List[PhotoSearch]
|
|
|
|
|
|
|
|
|
|
|
|
class RandomSearchResultsVideo(BaseModel):
|
|
|
|
results: List[VideoSearch]
|