From 45908b6f4e9c66fe102b30764e6d153a8d0339a5 Mon Sep 17 00:00:00 2001 From: Lorenz Diener Date: Sat, 12 Oct 2019 22:55:17 +0200 Subject: Add, test and document last-read markers. Fixes #192 --- docs/index.rst | 35 +++++++++++++++++++++++++++++++++-- 1 file changed, 33 insertions(+), 2 deletions(-) (limited to 'docs') diff --git a/docs/index.rst b/docs/index.rst index ef94b2a..1e64927 100644 --- a/docs/index.rst +++ b/docs/index.rst @@ -773,6 +773,20 @@ Featured tag dicts # (can be None if there are none) } +Read marker dicts +~~~~~~~~~~~~~~~~~ +.. _read marker dict: + +.. code-block:: python + + mastodon.markers_get()["home"] + # Returns the following dictionary: + { + 'last_read_id': # ID of the last read object in the timeline + 'version': # A counter that is incremented whenever the marker is set to a new status + 'updated_at': # The time the marker was last set, as a datetime object + } + Admin account dicts ~~~~~~~~~~~~~~~~~~~ .. _admin account dict: @@ -990,11 +1004,20 @@ muted or blocked by the logged in user. .. automethod:: Mastodon.mutes .. automethod:: Mastodon.blocks -Reading data: Reports (REMOVED IN 2.5.0) ----------------------------------------- +Reading data: Reports +--------------------- +In Mastodon versions before 2.5.0 this function allowed for the retrieval +of reports filed by the logged in user. It has since been removed. .. automethod:: Mastodon.reports + +Writing data: Last-read markers +-------------------------- +This function allows you to set get last read position for timelines. + +.. automethod:: Mastodon.markers_get + Reading data: Domain blocks --------------------------- @@ -1142,6 +1165,14 @@ Writing data: Reports .. automethod:: Mastodon.report +Writing data: Last-read markers +-------------------------- +This function allows you to set the last read position for timelines to +allow for persisting where the user was reading a timeline between sessions +and clients / devices. + +.. automethod:: Mastodon.markers_set + Writing data: Domain blocks --------------------------- These functions allow you to block and unblock all statuses from a domain -- cgit v1.2.3