kopia lustrzana https://github.com/halcy/Mastodon.py
Update information about dicts (media colors, card blurhash)
rodzic
fdb6e2a140
commit
c670ed8ce2
2
TODO.md
2
TODO.md
|
@ -16,7 +16,7 @@ Refer to mastodon changelog and API docs for details when implementing, add or m
|
|||
-----
|
||||
* [ ] Add personal notes for accounts
|
||||
* [x] Add customizable thumbnails for audio and video attachments
|
||||
* [ ] Add color extraction for thumbnails
|
||||
* [x] Add color extraction for thumbnails
|
||||
|
||||
3.3.0
|
||||
-----
|
||||
|
|
|
@ -571,12 +571,12 @@ Media dicts
|
|||
'remote_url': # The remote URL for the media (if the image is from a remote instance)
|
||||
'preview_url': # The URL for the media preview
|
||||
'text_url': # The display text for the media (what shows up in toots)
|
||||
'meta': # Dictionary of two image metadata dicts (see below),
|
||||
'meta': # Dictionary of two metadata dicts (see below),
|
||||
# 'original' and 'small' (preview). Either may be empty.
|
||||
# May additionally contain an "fps" field giving a videos frames per second (possibly
|
||||
# rounded), and a "length" field giving a videos length in a human-readable format.
|
||||
# Note that a video may have an image as preview.
|
||||
# May also contain a 'focus' dict.
|
||||
# May also contain a 'focus' dict and a media 'colors' dict.
|
||||
'blurhash': # The blurhash for the image, used for preview / placeholder generation
|
||||
'description': # If set, the user-provided description for this media.
|
||||
}
|
||||
|
@ -598,6 +598,12 @@ Media dicts
|
|||
'duration': # Duration of the video in seconds
|
||||
'bitrate': # Average bit-rate of the video in bytes per second
|
||||
}
|
||||
|
||||
# Metadata dicts (audio) - all fields are optional:
|
||||
{
|
||||
'duration': # Duration of the audio file in seconds
|
||||
'bitrate': # Average bit-rate of the audio file in bytes per second
|
||||
}
|
||||
|
||||
# Focus Metadata dict:
|
||||
{
|
||||
|
@ -605,6 +611,12 @@ Media dicts
|
|||
'y': Focus point x coordinate (between -1 and 1)
|
||||
}
|
||||
|
||||
# Media colors dict:
|
||||
{
|
||||
'foreground': # Estimated foreground colour for the attachment thumbnail
|
||||
'background': # Estimated background colour for the attachment thumbnail
|
||||
'accent': # Estimated accent colour for the attachment thumbnail
|
||||
|
||||
Card dicts
|
||||
~~~~~~~~~~
|
||||
.. _card dict:
|
||||
|
@ -629,6 +641,7 @@ Card dicts
|
|||
'html': # HTML string of the embed
|
||||
'provider_name': # Name of the provider from which the embed originates
|
||||
'provider_url': # URL pointing to the embeds provider
|
||||
'blurhash': # (optional) Blurhash of the preview image
|
||||
}
|
||||
|
||||
Search result dicts
|
||||
|
|
|
@ -208,7 +208,7 @@ class Mastodon:
|
|||
# Dict versions
|
||||
__DICT_VERSION_APPLICATION = "2.7.2"
|
||||
__DICT_VERSION_MENTION = "1.0.0"
|
||||
__DICT_VERSION_MEDIA = "2.8.2"
|
||||
__DICT_VERSION_MEDIA = "3.2.0"
|
||||
__DICT_VERSION_ACCOUNT = "3.1.0"
|
||||
__DICT_VERSION_POLL = "2.8.0"
|
||||
__DICT_VERSION_STATUS = bigger_version(bigger_version(bigger_version(bigger_version(bigger_version("3.1.0", __DICT_VERSION_MEDIA), __DICT_VERSION_ACCOUNT), __DICT_VERSION_APPLICATION), __DICT_VERSION_MENTION), __DICT_VERSION_POLL)
|
||||
|
@ -219,7 +219,7 @@ class Mastodon:
|
|||
__DICT_VERSION_NOTIFICATION = bigger_version(bigger_version("1.0.0", __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS)
|
||||
__DICT_VERSION_CONTEXT = bigger_version("1.0.0", __DICT_VERSION_STATUS)
|
||||
__DICT_VERSION_LIST = "2.1.0"
|
||||
__DICT_VERSION_CARD = "2.0.0"
|
||||
__DICT_VERSION_CARD = "3.2.0"
|
||||
__DICT_VERSION_SEARCHRESULT = bigger_version(bigger_version(bigger_version("1.0.0", __DICT_VERSION_ACCOUNT), __DICT_VERSION_STATUS), __DICT_VERSION_HASHTAG)
|
||||
__DICT_VERSION_ACTIVITY = "2.1.2"
|
||||
__DICT_VERSION_REPORT = "2.9.1"
|
||||
|
|
Ładowanie…
Reference in New Issue