perchance.org/api/getGeneratorList?max=123 - limit to a maximum of 123 generators

Are they latest-first?

It doesn’t seem like this “max” has to do with how many generators are returned. But the number returned does scale with it. So… last-updated age, perhaps? Not sure what unit of time it would be though. Quite confused.

Could be that it’s the max, before it removes private generators? Which would kind of make it not be the “maximum” anything really. Not a very useful parameter as it would be if it would actually give X number of generators–for paging, etc.

(Speaking of which is there a way of specifying “start from X generator number and later” for paging to work well?)

I don’t know what the default “max” or whatever is for this api. Seems to fluctuate how many are returned, and it’s not always a round number.

  • wthit56@lemmy.worldOP
    link
    fedilink
    English
    arrow-up
    1
    ·
    17 days ago

    Ah okay… I feel like that “max” thing is not ideal because people need to know pretty in-depth knowledge of how the server works in order to even understand what that parameter does, know what I mean? 😅 I’ll have to explain all this in my api plugin.

    Is it called “max” because all it says is you can’t get more than that number, and nothing more than that?

    I know for backwards-compatibility you can’t change that. But maybe a different param for “actually how many generators I want to get back, no more, no less please thanks.”