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

  • fixmycode@feddit.clOP
    link
    fedilink
    arrow-up
    2
    ·
    1 year ago

    What values are you sending for limit and page? Are you sure they just aren’t out of range?

    I believe I’ve borked it by setting page to 0, if I start with 1, I don’t receive the error, thanks for all the help.