this post was submitted on 01 Sep 2024
1 points (100.0% liked)

Perchance - Create a Random Text Generator

391 readers
7 users here now

⚄︎ Perchance

This is a Lemmy Community for perchance.org, a platform for sharing and creating random text generators.

Feel free to ask for help, share your generators, and start friendly discussions at your leisure :)

This community is mainly for discussions between those who are building generators. For discussions about using generators, especially the popular AI ones, the community-led Casual Perchance forum is likely a more appropriate venue.

See this post for the Complete Guide to Posting Here on the Community!

Rules

1. Please follow the Lemmy.World instance rules.

2. Be kind and friendly.

  • Please be kind to others on this community (and also in general), and remember that for many people Perchance is their first experience with coding. We have members for whom English is not their first language, so please be take that into account too :)

3. Be thankful to those who try to help you.

  • If you ask a question and someone has made a effort to help you out, please remember to be thankful! Even if they don't manage to help you solve your problem - remember that they're spending time out of their day to try to help a stranger :)

4. Only post about stuff related to perchance.

  • Please only post about perchance related stuff like generators on it, bugs, and the site.

5. Refrain from requesting Prompts for the AI Tools.

  • We would like to ask to refrain from posting here needing help specifically with prompting/achieving certain results with the AI plugins (text-to-image-plugin and ai-text-plugin) e.g. "What is the good prompt for X?", "How to achieve X with Y generator?"
  • See Perchance AI FAQ for FAQ about the AI tools.
  • You can ask for help with prompting at the 'sister' community Casual Perchance, which is for more casual discussions.
  • We will still be helping/answering questions about the plugins as long as it is related to building generators with them.

6. Search through the Community Before Posting.

  • Please Search through the Community Posts here (and on Reddit) before posting to see if what you will post has similar post/already been posted.

founded 1 year ago
MODERATORS
 

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.

top 8 comments
sorted by: hot top controversial new old
[–] [email protected] 1 points 2 weeks ago
[–] [email protected] 1 points 2 weeks ago (6 children)

Are they latest-first?

Yes, they should be.

Could be that it’s the max, before it removes private generators?

Correct! But it also hides based on some heuristics to prevent forks of popular generators by newbies being 50% of the results or whatever, since sometimes forks are accidental, and often they're not "interesting" - i.e. user is just trying out forking for the first time and so just makes one small edit. IIRC this is type of filtering is based on something like needing at least a couple of edits if the account is new.

Currently there is no pagination. I'd like to fix all this up, add search, etc. at some point but it's not a top priority right now - though it can become a higher priority through pestering, of course.

[–] [email protected] 1 points 2 weeks 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."

[–] [email protected] 1 points 2 weeks ago

Oh, and I feel like there's a default "max" or perhaps some other way it decides how much to give back if nothing is specified... what is that?

[–] [email protected] 1 points 2 weeks ago

What is the publicId? Is it useful for anything, or just internal legacy type stuff?

[–] [email protected] 1 points 2 weeks ago

It seems for generatorStats, tags are not included in the metaData object?

[–] [email protected] 1 points 2 weeks ago

I notice lastEditTime_ago is not included for getGeneratorStats.

[–] [email protected] 1 points 2 weeks ago

Some APIs have status: "success", others use success: true. Which is... a thing. 😂

Might be a good idea to have both on all of them? Or pick on and make sure they all use it. Then people (meaning me) wouldn't have to check for both or get confused about which is which.