Misc: Markers, reports

Markers

These functions allow you to interact with the timeline “last read” markers, to allow for persisting where the user was reading a timeline between sessions and clients / devices.

Reading

Mastodon.markers_get(timeline=['home'])[source]

Get the last-read-location markers for the specified timelines. Valid timelines are the same as in timeline()

Note that despite the singular name, timeline can be a list.

Returns a dict of read marker dicts, keyed by timeline name.

Added: Mastodon v3.0.0, last changed: Mastodon v3.0.0

Writing

Mastodon.markers_set(timelines, last_read_ids)[source]

Set the “last read” marker(s) for the given timeline(s) to the given id(s)

Note that if you give an invalid timeline name, this will silently do nothing.

Returns a dict with the updated read marker dicts, keyed by timeline name.

Added: Mastodon v3.0.0, last changed: Mastodon v3.0.0

Reports

Reading

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.

Mastodon.reports()[source]

Fetch a list of reports made by the logged-in user.

Returns a list of report dicts.

Warning: This method has now finally been removed, and will not work on Mastodon versions 2.5.0 and above.

Added: Mastodon v1.1.0, last changed: Mastodon v1.1.0

Writing

This function allows you to report a user to the instance moderators as well as to the users home instance.

Mastodon.report(account_id, status_ids=None, comment=None, forward=False, category=None, rule_ids=None)[source]

Report statuses to the instances administrators.

Accepts a list of toot IDs associated with the report, and a comment.

Starting with Mastodon 3.5.0, you can also pass a category (one out of “spam”, “violation” or “other”) and rule_ids (a list of rule IDs corresponding to the rules returned by the instance() API).

Set forward to True to forward a report of a remote user to that users instance as well as sending it to the instance local administrators.

Returns a report dict.

Added: Mastodon v1.1.0, last changed: Mastodon v3.5.0