The official Mastodon API documentation has many endpoints that return collections of Status objects, but not all have the same parameters.
An interesting one is the ability to request only posts that contain media attachments - audio, video, or images.
This parameter is called “only_media” in each instance and can be set to true or false. The default is false. You currently can’t filter to a specific media type, like only returning video.
The issue is that not all of the endpoints HAVE the option to return only media attachments.
I noticed that Masto.js has a common “listParameters” object that includes an “onlyMedia?” optional flag, even on the Home and List timelines, which don’t have this filter.
Here’s the list. Note that some endpoints are listed twice, with different parameters passed through. I’ve listed as such because on the front-end, this is often how they are displayed to an end user.
It’s disappointing that the home timeline doesn’t have the only_media flag. Imagine building a timeline of only videos, like a TikTok feed. That would be cool!
|The default feed of followed posts and hashtags
|All local posts, using the public timeline with local set to true
|All federated posts known to your instance
|My account posts
|Usually seen on the profile page, a feed of the posts you have created
|Usually seen on the profile page, a feed of posts you have favourited
|Usually seen on the profile page, a feed of posts you have bookmarked
|A feed of posts for a single hashtag, followed or not followed
|A feed of posts related to a specific List.
|My followed tags
|I have not seen this used anywhere, requires some configuration to create the search parameters, not just a direct call.