lemmy icon indicating copy to clipboard operation
lemmy copied to clipboard

Get random community

Open aeharding opened this issue 1 year ago • 0 comments

Requirements

  • [X] Is this a feature request? For questions or discussions use https://lemmy.ml/c/lemmy_support
  • [X] Did you check to see if this issue already exists?
  • [X] Is this only a feature request? Do not put multiple feature requests in one issue.
  • [X] Is this a backend issue? Use the lemmy-ui repo for UI / frontend issues.
  • [X] Do you agree to follow the rules in our Code of Conduct?

Is your proposal related to a problem?

I would like a way to fetch a random community

Describe the solution you'd like.

GET /api/v3/community/random?type_=All

Returns:

GetCommunityResponse

Describe alternatives you've considered.

There is no good alternative. You could get a random page of communities, but there is no way to determine the total number of federated communities for a site (you can only determine # of local communities in site aggregates).

Also, page # is being phased out in favor of page cursor (which is good, but will make the above workaround no longer possible)

Additional context

There is definite user interest for this feature with Voyager.

aeharding avatar May 04 '24 17:05 aeharding