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: str | List[str] = ['home']) Dict[str, Marker][source]

Get the last-read-location markers for the specified timelines. Valid timelines are home (the home timeline) and notifications (the notifications timeline, affects which notifications are considered read).

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

Returns a dict with the markers, keyed by timeline name.

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

Writing

Mastodon.markers_set(timelines: str | List[str], last_read_ids: Status | str | int | MaybeSnowflakeIdType | datetime | List[Status] | List[str | int | MaybeSnowflakeIdType | datetime]) Dict[str, Marker][source]

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

Valid timelines are home (the home timeline) and notifications (the notifications timeline, affects which notifications are considered read).

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

Returns a dict with the updated markers, 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() NonPaginatableList[Report][source]

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

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: Account | str | int | MaybeSnowflakeIdType | datetime, status_ids: Status | str | int | MaybeSnowflakeIdType | datetime | None = None, comment: str | None = None, forward: bool = False, category: str | None = None, rule_ids: List[Rule | str | int | MaybeSnowflakeIdType | datetime] | None = None, forward_to_domains: List[str] | None = None) Report[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. Set forward_to_domains to a list of domains to forward the report to (only domains of people mentioned in the status), or omitto forward to the domain of the reported status.

Added: Mastodon v1.1.0, last changed: Mastodon v3.5.0 (parameters), Mastodon v4.0.0 (return value)