this post was submitted on 11 Aug 2023
1 points (100.0% liked)

Lemmy App Development

698 readers
24 users here now

A place for Lemmy builders to chat about building apps, clients, tools and bots for the Lemmy platform.

On-Topic:

Off-Topic:

founded 1 year ago
MODERATORS
 

I'm in the process of developing a bot. My intention is to scan all comments regardless of depth in a given community up to a certain date, so it receives only the comments made since the last request. I want to play nice so I'm also trying to do it on the less amount of queries possible.

The community I'm testing this is fairly small, it has 40 comments total, but the problem is that when I request comments without specifying max_depth, and sort ordered by New, I receive only 10 comments, if I try to specify page, or limit, I get an error {"error":"couldnt_get_comments"}.

If I don't specify page or limit, and set an arbitrary number for max_depth, like 4, I get the 40 comments I'm expecting.

My question is: what's the correct way to request comments? My intention is doing something similar to an user pressing "Comments" on front of a community, like calling the community URL with params ?dataType=Comment&page=1&sort=New

no comments (yet)
sorted by: hot top controversial new old
there doesn't seem to be anything here