aboutsummaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorLorenz Diener <[email protected]>2018-05-06 15:55:32 +0200
committerGitHub <[email protected]>2018-05-06 15:55:32 +0200
commitca0ea36c6edd58dc15e5fd7f31f24ba5097d6e8d (patch)
tree98328e8776447334b19592992016d9b7f16ae98b /docs
parent06e32c14bcb5a1ef1a5e618a1b413ea011416c9d (diff)
parentfbd4122fec092bff6b1cc9f44dfeda6ee693c41b (diff)
downloadmastodon.py-ca0ea36c6edd58dc15e5fd7f31f24ba5097d6e8d.tar.gz
Merge branch 'master' into stream-timeout
Diffstat (limited to 'docs')
-rw-r--r--docs/index.rst20
1 files changed, 17 insertions, 3 deletions
diff --git a/docs/index.rst b/docs/index.rst
index 4de0f6e..436d7cc 100644
--- a/docs/index.rst
+++ b/docs/index.rst
@@ -385,10 +385,13 @@ Media dicts
385 'preview_url': # The URL for the media preview 385 'preview_url': # The URL for the media preview
386 'text_url': # The display text for the media (what shows up in toots) 386 'text_url': # The display text for the media (what shows up in toots)
387 'meta': # Dictionary of two image metadata dicts (see below), 387 'meta': # Dictionary of two image metadata dicts (see below),
388 # 'original' and 'small' (preview) 388 # 'original' and 'small' (preview). Either may be empty.
389 # May additionally contain an "fps" field giving a videos frames per second (possibly
390 # rounded), and a "length" field giving a videos length in a human-readable format.
391 # Note that a video may have an image as preview.
389 } 392 }
390 393
391 # Metadata dicts: 394 # Metadata dicts (image) - all fields are optional:
392 { 395 {
393 'width': # Width of the image in pixels 396 'width': # Width of the image in pixels
394 'height': # Height of the image in pixels 397 'height': # Height of the image in pixels
@@ -396,6 +399,14 @@ Media dicts
396 'size': # Textual representation of the image size in pixels, e.g. '800x600' 399 'size': # Textual representation of the image size in pixels, e.g. '800x600'
397 } 400 }
398 401
402 # Metadata dicts (video, gifv) - all fields are optional:
403 {
404 'width': # Width of the video in pixels
405 'heigh': # Height of the video in pixels
406 'frame_rate': # Exact frame rate of the video in frames per second
407 'duration': # Duration of the video in seconds
408 'bitrate': # Average bit-rate of the video in bytes per second
409 }
399Card dicts 410Card dicts
400~~~~~~~~~~ 411~~~~~~~~~~
401.. _card dict: 412.. _card dict:
@@ -452,6 +463,8 @@ Instance dicts
452 'version': # The instances mastodon version 463 'version': # The instances mastodon version
453 'urls': # Additional URLs dict, presently only 'streaming_api' with the 464 'urls': # Additional URLs dict, presently only 'streaming_api' with the
454 # stream websocket address. 465 # stream websocket address.
466 'contact_account': # Account dict of the primary contact for the instance.
467 'languages': # Array of ISO 6391 language codes the instance has chosen to advertise.
455 } 468 }
456 469
457Activity dicts 470Activity dicts
@@ -731,7 +744,8 @@ If `async` is True, the listener will listen on another thread and these methods
731will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True, 744will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True,
732the thread will attempt to reconnect to the streaming API if any errors are encountered, waiting 745the thread will attempt to reconnect to the streaming API if any errors are encountered, waiting
733`async_reconnect_wait_sec` seconds between reconnection attempts. Note that no effort is made 746`async_reconnect_wait_sec` seconds between reconnection attempts. Note that no effort is made
734to "catch up" - toots made while the connection is broken will not be received. 747to "catch up" - events created while the connection is broken will not be received. If you need to make
748sure to get absolutely all notifications / deletes / toots, you will have to do that manually.
735 749
736The connection may be closed at any time by calling the handles close() method. The 750The connection may be closed at any time by calling the handles close() method. The
737current status of the handler thread can be checked with the handles is_alive() function, 751current status of the handler thread can be checked with the handles is_alive() function,
Powered by cgit v1.2.3 (git 2.41.0)