diff options
author | Lorenz Diener <[email protected]> | 2018-07-30 17:29:37 +0200 |
---|---|---|
committer | Lorenz Diener <[email protected]> | 2018-07-30 17:29:37 +0200 |
commit | de0d5df86152ab5f4a748fecd0d2089e701820cd (patch) | |
tree | 50830eb14f39f8c690d8181dab315db283a2d8a4 /docs | |
parent | cf2d0ebc8246cea8c5e1dbb48687b625affe53c8 (diff) | |
download | mastodon.py-de0d5df86152ab5f4a748fecd0d2089e701820cd.tar.gz |
Add keyword filters
Diffstat (limited to 'docs')
-rw-r--r-- | docs/index.rst | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/docs/index.rst b/docs/index.rst index 6cb782e..3921356 100644 --- a/docs/index.rst +++ b/docs/index.rst | |||
@@ -362,6 +362,25 @@ Relationship dicts | |||
362 | # logged-in users Timeline | 362 | # logged-in users Timeline |
363 | } | 363 | } |
364 | 364 | ||
365 | Filter dicts | ||
366 | ~~~~~~~~~~~~ | ||
367 | .. _filter dict: | ||
368 | |||
369 | .. code-block:: python | ||
370 | |||
371 | mastodon.account_follow(<numerical id>) | ||
372 | # Returns the following dictionary: | ||
373 | { | ||
374 | 'id': # Numerical id of the filter | ||
375 | 'phrase': # Filtered keyword or phrase | ||
376 | 'context': # List of places where the filters are applied ('home', 'notifications', 'public', 'thread') | ||
377 | 'expires_at': # Expiry date for the filter | ||
378 | 'irreversible': # Boolean denoting if this filter is executed server-side | ||
379 | # or if it should be ran client-side (Note that Mastodon.py does | ||
380 | # not run client-side filters for you). | ||
381 | 'whole_word': # Boolean denoting whether this filter can match partial words | ||
382 | } | ||
383 | |||
365 | Notification dicts | 384 | Notification dicts |
366 | ~~~~~~~~~~~~~~~~~~ | 385 | ~~~~~~~~~~~~~~~~~~ |
367 | .. _notification dict: | 386 | .. _notification dict: |
@@ -677,6 +696,13 @@ their relationships. | |||
677 | .. automethod:: Mastodon.account_relationships | 696 | .. automethod:: Mastodon.account_relationships |
678 | .. automethod:: Mastodon.account_search | 697 | .. automethod:: Mastodon.account_search |
679 | 698 | ||
699 | Writing data: Keyword filters | ||
700 | ----------------------------- | ||
701 | These functions allow you to get information about keyword filters. | ||
702 | |||
703 | .. automethod:: Mastodon.filters | ||
704 | .. automethod:: Mastodon.filter | ||
705 | |||
680 | Reading data: Follow suggestions | 706 | Reading data: Follow suggestions |
681 | -------------------------------- | 707 | -------------------------------- |
682 | 708 | ||
@@ -779,6 +805,14 @@ These functions allow you to interact with other accounts: To (un)follow and | |||
779 | .. automethod:: Mastodon.account_unmute | 805 | .. automethod:: Mastodon.account_unmute |
780 | .. automethod:: Mastodon.account_update_credentials | 806 | .. automethod:: Mastodon.account_update_credentials |
781 | 807 | ||
808 | Writing data: Keyword filters | ||
809 | ----------------------------- | ||
810 | These functions allow you to manipulate keyword filters. | ||
811 | |||
812 | .. automethod:: Mastodon.filter_create | ||
813 | .. automethod:: Mastodon.filter_update | ||
814 | .. automethod:: Mastodon.filter_delete | ||
815 | |||
782 | Writing data: Follow suggestions | 816 | Writing data: Follow suggestions |
783 | -------------------------------- | 817 | -------------------------------- |
784 | 818 | ||