I want to start creating bots for Lemmy, but have a couple of questions about iterating through posts, comments, repports...
I'm new to lemmy, only been here a few days, but I have already ported over one of my reddit bots to Lemmy and it was really easy, like orders of magnitude easier than it was to get my first reddit bot working.
There are lots of wrappers available and I am researching everything to figure out how best to proceed with a more serious bot. Most of my scripts for reddit were moderation tools. Lemmy doesn't seem large enough to need a lot of moderation yet, but I still want to get to work creating things because it's fun.
I'm finding documentation scarce in some cases so I just wanted to pose a question here. On reddit, if I want to look at posts (or comments, reports, modqueue, and so on) I iterate through a listing and then narrow my search based on what type of post I need.
Does Lemmy use listings, or how do you process posts/comments in the same fashion as you'd do over there?
I haven't had to take any mod actions yet because I don't have any reports, so I haven't really explored any of the mod actions via the api.
I think I may have answered my own question. It appears that instead of using listings, this data is stored as keys in a dict. It looks like effectively you would do something like this in python.
posts = lemmy.post.list(community_name=moderated, sort="New")
for post in posts["posts"]:
# do something
Don't have an answer to your question, but just wanted to chime in and say that mod tools seem to be sorely needed! This often comes up in community discussions, and any contributions would be very welcome.