asudox@lemmy.world to No Stupid Questions@lemmy.world · edit-23 months ago[ANSWERED] How do you get the ID of the owner of a lemmy community via the API?message-squaremessage-square8fedilinkarrow-up11arrow-down10
arrow-up11arrow-down1message-square[ANSWERED] How do you get the ID of the owner of a lemmy community via the API?asudox@lemmy.world to No Stupid Questions@lemmy.world · edit-23 months agomessage-square8fedilink
minus-squareAdmiral Patrick@dubvee.orglinkfedilinkEnglisharrow-up0·3 months ago/api/v3/community It’ll respond with an object of GetCommunityResponse (https://join-lemmy.org/api/interfaces/GetCommunityResponse.html) The moderators array will have an array of objects of which moderator is a Person type. The “top mod” is also the owner, and they’ll always be the first entry in the moderators array from /api/v3/community
minus-squareasudox@lemmy.worldOPlinkfedilinkarrow-up0·3 months agoOh great. So it preserves the order. Thanks.
minus-squareAdmiral Patrick@dubvee.orglinkfedilinkEnglisharrow-up0·3 months agoYes, 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).
/api/v3/community
It’ll respond with an object of
GetCommunityResponse
(https://join-lemmy.org/api/interfaces/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.