[ANSWERED] How do you get the ID of the owner of a lemmy community via the API?
from Asudox@lemmy.world to nostupidquestions@lemmy.world on 14 Aug 2024 17:14
https://lemmy.world/post/18644445
from Asudox@lemmy.world to nostupidquestions@lemmy.world on 14 Aug 2024 17:14
https://lemmy.world/post/18644445
#nostupidquestions
threaded - newest
mods are listed on the far right, bottom
Via the API.
o0o sorry, missed that bit!
You didn’t miss it. I forgot to include it, sorry.
GET /api/v3/community
It’ll respond with an object of
GetCommunityResponse
(join-lemmy.org/api/…/GetCommunityResponse.html)The
moderators
array will have an array of objects of whichmoderator
is aPerson
type.The “top mod” is also the owner, and they’ll always be the first entry in the
moderators
array from/api/v3/community
Oh great. So it preserves the order. Thanks.
Yes, mostly.
I’ve seen cases where
TransferCommunity
events aren’t federated, so the correct order is only guaranteed if you query the home instance for the community.(Assuming community transfer events are even supposed to federate, that is).
Got it.