MediaAttachment debuggingw
Build and Release / run-terraform (push) Successful in 42s
Details
Build and Release / run-terraform (push) Successful in 42s
Details
This commit is contained in:
parent
1d2178a54e
commit
686d8e1029
|
@ -2,19 +2,33 @@ from pydantic import BaseModel, Field
|
|||
from typing import Optional
|
||||
|
||||
class MetaData(BaseModel):
|
||||
width: int
|
||||
height: int
|
||||
size: str
|
||||
aspect: float
|
||||
width: Optional[int] = None
|
||||
height: Optional[int] = None
|
||||
size: Optional[str] = None
|
||||
aspect: Optional[float] = None
|
||||
frame_rate: Optional[str] = None
|
||||
duration: Optional[float] = None
|
||||
bitrate: Optional[int] = None
|
||||
|
||||
class MetaCoordinates(BaseModel):
|
||||
x: float
|
||||
y: float
|
||||
|
||||
class Meta(BaseModel):
|
||||
length: Optional[str] = None
|
||||
duration: Optional[float] = None
|
||||
fps: Optional[int] = None
|
||||
size: Optional[str] = None
|
||||
width: Optional[int] = None
|
||||
height: Optional[int]= None
|
||||
aspect: Optional[float] = None
|
||||
audio_encode: Optional[str] = None
|
||||
audio_bitrate: Optional[str] = None
|
||||
audio_channels: Optional[str] = None
|
||||
|
||||
original: MetaData
|
||||
small: MetaData
|
||||
focus: Optional[MetaCoordinates]
|
||||
focus: Optional[MetaCoordinates] = None
|
||||
|
||||
class MediaAttachment(BaseModel):
|
||||
media_id: str = Field(alias="id")
|
||||
|
|
|
@ -28,7 +28,7 @@ class Status(BaseModel):
|
|||
bookmarked: bool
|
||||
content: str
|
||||
reblog: Optional["Status"]
|
||||
# application: Optional[Application]
|
||||
application: Optional[Application] = None
|
||||
account: Account
|
||||
media_attachments: List[MediaAttachment]
|
||||
mentions: List
|
||||
|
|
|
@ -23,5 +23,5 @@ class Timelines():
|
|||
parameters["limit"] = limit
|
||||
|
||||
response = requests.get(url, headers=self.auth.get_auth_headers(), params=parameters)
|
||||
logger.debug("JSON: {}".format(response.raw()))
|
||||
logger.debug("JSON: {}".format(response.raw))
|
||||
return response.json()
|
||||
|
|
|
@ -83,7 +83,43 @@
|
|||
},
|
||||
"description": "test media description",
|
||||
"blurhash": "UFBWY:8_0Jxv4mx]t8t64.%M-:IUWGWAt6M}"
|
||||
}],
|
||||
},
|
||||
{
|
||||
"id": "22546306",
|
||||
"type": "video",
|
||||
"url": "https://files.mastodon.social/media_attachments/files/022/546/306/original/dab9a597f68b9745.mp4",
|
||||
"preview_url": "https://files.mastodon.social/media_attachments/files/022/546/306/small/dab9a597f68b9745.png",
|
||||
"remote_url": null,
|
||||
"text_url": "https://mastodon.social/media/wWd1HJIBmH1MZGDfg50",
|
||||
"meta": {
|
||||
"length": "0:01:28.65",
|
||||
"duration": 88.65,
|
||||
"fps": 24,
|
||||
"size": "1280x720",
|
||||
"width": 1280,
|
||||
"height": 720,
|
||||
"aspect": 1.7777777777777777,
|
||||
"audio_encode": "aac (LC) (mp4a / 0x6134706D)",
|
||||
"audio_bitrate": "44100 Hz",
|
||||
"audio_channels": "stereo",
|
||||
"original": {
|
||||
"width": 1280,
|
||||
"height": 720,
|
||||
"frame_rate": "6159375/249269",
|
||||
"duration": 88.654,
|
||||
"bitrate": 862056
|
||||
},
|
||||
"small": {
|
||||
"width": 400,
|
||||
"height": 225,
|
||||
"size": "400x225",
|
||||
"aspect": 1.7777777777777777
|
||||
}
|
||||
},
|
||||
"description": null,
|
||||
"blurhash": "U58E0g8_0M.94T?bIr00?bD%NGoM?bD%oLt7"
|
||||
}
|
||||
],
|
||||
"mentions": [],
|
||||
"tags": [],
|
||||
"emojis": [],
|
||||
|
|
Loading…
Reference in New Issue