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
|
from typing import Optional
|
||||||
|
|
||||||
class MetaData(BaseModel):
|
class MetaData(BaseModel):
|
||||||
width: int
|
width: Optional[int] = None
|
||||||
height: int
|
height: Optional[int] = None
|
||||||
size: str
|
size: Optional[str] = None
|
||||||
aspect: float
|
aspect: Optional[float] = None
|
||||||
|
frame_rate: Optional[str] = None
|
||||||
|
duration: Optional[float] = None
|
||||||
|
bitrate: Optional[int] = None
|
||||||
|
|
||||||
class MetaCoordinates(BaseModel):
|
class MetaCoordinates(BaseModel):
|
||||||
x: float
|
x: float
|
||||||
y: float
|
y: float
|
||||||
|
|
||||||
class Meta(BaseModel):
|
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
|
original: MetaData
|
||||||
small: MetaData
|
small: MetaData
|
||||||
focus: Optional[MetaCoordinates]
|
focus: Optional[MetaCoordinates] = None
|
||||||
|
|
||||||
class MediaAttachment(BaseModel):
|
class MediaAttachment(BaseModel):
|
||||||
media_id: str = Field(alias="id")
|
media_id: str = Field(alias="id")
|
||||||
|
|
|
@ -28,7 +28,7 @@ class Status(BaseModel):
|
||||||
bookmarked: bool
|
bookmarked: bool
|
||||||
content: str
|
content: str
|
||||||
reblog: Optional["Status"]
|
reblog: Optional["Status"]
|
||||||
# application: Optional[Application]
|
application: Optional[Application] = None
|
||||||
account: Account
|
account: Account
|
||||||
media_attachments: List[MediaAttachment]
|
media_attachments: List[MediaAttachment]
|
||||||
mentions: List
|
mentions: List
|
||||||
|
|
|
@ -23,5 +23,5 @@ class Timelines():
|
||||||
parameters["limit"] = limit
|
parameters["limit"] = limit
|
||||||
|
|
||||||
response = requests.get(url, headers=self.auth.get_auth_headers(), params=parameters)
|
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()
|
return response.json()
|
||||||
|
|
|
@ -83,7 +83,43 @@
|
||||||
},
|
},
|
||||||
"description": "test media description",
|
"description": "test media description",
|
||||||
"blurhash": "UFBWY:8_0Jxv4mx]t8t64.%M-:IUWGWAt6M}"
|
"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": [],
|
"mentions": [],
|
||||||
"tags": [],
|
"tags": [],
|
||||||
"emojis": [],
|
"emojis": [],
|
||||||
|
|
Loading…
Reference in New Issue