Skip to main content


It works!!!!!!!! An API Endpoint to post statuses directly into lists so people can make their own #DIYAlgorithms . Now some cleanup and a bit of UX stuff but i can't believe i actually wrote code in #Ruby i am proud of myself. 😀
#MastoDev
Jupyter notebook of two API requests, one to make a list and the second to get posts from the federated feed. (these are standard APIs on masto so not adding exhaustive alt text). The output from getting posts from the federated feed shows one post from me on neuromatch.social One more check is that we can get the list timeline from the standard list API method, and we can!!!!
Two more API calls, these ones are new: both use the /api/v1/lists/:list_id/statuses endpoint. The first is a POST adding a status by its ID, and the second is seeing what posts exist for the list. We can see that the post we got from the federated feed is now on our list! Just a screenshot from the mastodon interface this time showing that the post is indeed in the list we just created.

(it's this post, which isn't all that important: https://neuromatch.social/@jonny/109544855404444286 )
so, posting to a list treats everyone on that list as if they're addressed?
so you can share things with your close family list only, or your work list, or whatever? Like circles or aspects?
@evan that's actually another thing I have been thinking about w.r.t. ways to hack on lists 😀 in this case I'm referring to HTTP POSTs not posts like toots. So the idea is you have some script you are running on your own that is streaming a timeline and computing some sorting algorithm on top of it, and then it POSTs an array of status IDs to a list, rather than autopopulating from accounts on a list. hence DIY Algorithms 😀
lists are groups of people, though. Not streams.
@evan currently they are groups of people! but under the hood there is very little difference: I added a "list mode" parameter that explicitly switches between "account" and "status" mode so it's clearer which kind of list is which.
could you use another API endpoint for user-curated streams?
@evan sure! the endpoint could be anywhere. again lists were a tactical choice: ideally you would have a library of feeds of different types that would be more or less interchangeable, but the only feed in masto that you can add to are lists atm. I plan to generalize feeds in the next round but for now, without rewriting all the downstream apps, lists are the lightest lift and basically have very little cognitive overhead since it's just flicking one switch from accounts to posts
@evan I did a quick mod of the status compose interface the other day and saw how it works, and between that and this I think it would be pretty trivial to make a drop-down menu under post visibility that selects a list, and then uses either an ActivityStreams Collection of accounts in the To field, or abuses the "direct message" functionality and autopopulates the message with @'s. need higher char limits by default tho
yes, posting to a collection is the right way to do it.
@evan yes, just have to see how masto and other fedi apps/clients handle it 😀
@evan the next step of the DIY algo part is to make a toolkit of algorithmic primitives so it's v easy to adjust various sliders and combine different derived metrics together. no ML black boxes, but the first things I want to try and do for myself are fixing timezone/sleep cycle mismatches as well as correcting post frequency mismatches yno
I like the idea but wish it was distinct from lists.
@evan it was a tactical choice: idk how the masto dev process works and I wanted it to be compatible with all the existing downstream apps and frontends. wanted to implement in a way that was as minimal of a change as possible. in future versions I'll be generalizing the notion of feeds because it's surprisingly low-fi and there are a lot of points of generalization that don't seem to have been taken.
⇧