First steps to 2.3.0 support
This commit is contained in:
pare
78d3b3a5df
commit
5f44998dd2
S'han modificat 2 arxius amb 19 adicions i 4 eliminacions
|
@ -385,10 +385,13 @@ Media dicts
|
||||||
'preview_url': # The URL for the media preview
|
'preview_url': # The URL for the media preview
|
||||||
'text_url': # The display text for the media (what shows up in toots)
|
'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 image metadata dicts (see below),
|
||||||
# 'original' and 'small' (preview)
|
# '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.
|
||||||
}
|
}
|
||||||
|
|
||||||
# Metadata dicts:
|
# Metadata dicts (image) - all fields are optional:
|
||||||
{
|
{
|
||||||
'width': # Width of the image in pixels
|
'width': # Width of the image in pixels
|
||||||
'height': # Height of the image in pixels
|
'height': # Height of the image in pixels
|
||||||
|
@ -396,6 +399,14 @@ Media dicts
|
||||||
'size': # Textual representation of the image size in pixels, e.g. '800x600'
|
'size': # Textual representation of the image size in pixels, e.g. '800x600'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Metadata dicts (video, gifv) - all fields are optional:
|
||||||
|
{
|
||||||
|
'width': # Width of the video in pixels
|
||||||
|
'heigh': # Height of the video in pixels
|
||||||
|
'frame_rate': # Exact frame rate of the video in frames per second
|
||||||
|
'duration': # Duration of the video in seconds
|
||||||
|
'bitrate': # Average bit-rate of the video in bytes per second
|
||||||
|
}
|
||||||
Card dicts
|
Card dicts
|
||||||
~~~~~~~~~~
|
~~~~~~~~~~
|
||||||
.. _card dict:
|
.. _card dict:
|
||||||
|
@ -452,6 +463,8 @@ Instance dicts
|
||||||
'version': # The instances mastodon version
|
'version': # The instances mastodon version
|
||||||
'urls': # Additional URLs dict, presently only 'streaming_api' with the
|
'urls': # Additional URLs dict, presently only 'streaming_api' with the
|
||||||
# stream websocket address.
|
# stream websocket address.
|
||||||
|
'contact_account': # Account dict of the primary contact for the instance.
|
||||||
|
'languages': # Array of ISO 6391 language codes the instance has chosen to advertise.
|
||||||
}
|
}
|
||||||
|
|
||||||
Activity dicts
|
Activity dicts
|
||||||
|
|
|
@ -1143,9 +1143,9 @@ class Mastodon:
|
||||||
url = '/api/v1/accounts/{0}/unmute'.format(str(id))
|
url = '/api/v1/accounts/{0}/unmute'.format(str(id))
|
||||||
return self.__api_request('POST', url)
|
return self.__api_request('POST', url)
|
||||||
|
|
||||||
@api_version("1.1.1", "2.1.0")
|
@api_version("1.1.1", "2.3.0")
|
||||||
def account_update_credentials(self, display_name=None, note=None,
|
def account_update_credentials(self, display_name=None, note=None,
|
||||||
avatar=None, header=None):
|
avatar=None, header=None, locked=None):
|
||||||
"""
|
"""
|
||||||
Update the profile for the currently logged-in user.
|
Update the profile for the currently logged-in user.
|
||||||
|
|
||||||
|
@ -1154,6 +1154,8 @@ class Mastodon:
|
||||||
'avatar' and 'header' are images encoded in base64, prepended by a content-type
|
'avatar' and 'header' are images encoded in base64, prepended by a content-type
|
||||||
(for example: 'data:image/png;base64,iVBORw0KGgoAAAA[...]')
|
(for example: 'data:image/png;base64,iVBORw0KGgoAAAA[...]')
|
||||||
|
|
||||||
|
'locked' specifies whether the user needs to manually approve follow requests.
|
||||||
|
|
||||||
Returns the updated `user dict` of the logged-in user.
|
Returns the updated `user dict` of the logged-in user.
|
||||||
"""
|
"""
|
||||||
params = self.__generate_params(locals())
|
params = self.__generate_params(locals())
|
||||||
|
|
Loading…
Referencia en una nova incidència