diff options
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 20 |
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 | } | ||
399 | Card dicts | 410 | Card 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 | ||
457 | Activity dicts | 470 | Activity dicts |
@@ -731,7 +744,8 @@ If `async` is True, the listener will listen on another thread and these methods | |||
731 | will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True, | 744 | will return a handle corresponding to the open connection. If, in addition, `async_reconnect` is True, |
732 | the thread will attempt to reconnect to the streaming API if any errors are encountered, waiting | 745 | the 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 |
734 | to "catch up" - toots made while the connection is broken will not be received. | 747 | to "catch up" - events created while the connection is broken will not be received. If you need to make |
748 | sure to get absolutely all notifications / deletes / toots, you will have to do that manually. | ||
735 | 749 | ||
736 | The connection may be closed at any time by calling the handles close() method. The | 750 | The connection may be closed at any time by calling the handles close() method. The |
737 | current status of the handler thread can be checked with the handles is_alive() function, | 751 | current status of the handler thread can be checked with the handles is_alive() function, |