Does Lemmy have some public JSON API to query information about communities?
I would like to adapt this to automatically configure XMPP chatrooms for each Lemmy community: https://modules.prosody.im/mod_muc_http_defaults.html
Thanks!
Does Lemmy have some public JSON API to query information about communities?
I would like to adapt this to automatically configure XMPP chatrooms for each Lemmy community: https://modules.prosody.im/mod_muc_http_defaults.html
Thanks!
Thanks! I think the first link should probably work 🤔
Edit: odd, it only seems to list 10 communities.
That’s the default page size. You can ask for more. Not sure what the upper limit is:
https://slrpnk.net/api/v3/community/list?limit=20
This will give 20 communities.
Hmm, I tried querying for individual communities but it just gives a blank page. What would be the syntax for that?
You mean searching?
The full http api is here: https://join-lemmy.org/api/classes/LemmyHttp.html
By id seems to work: https://slrpnk.net/api/v3/community?id=4112
But https://slrpnk.net/api/v3/community?name=foss just results in
error: "couldnt_find_community"
Sadly by id doesn’t work for my usecase as I want to use the same webfinger address of the communty as the chatroom address on XMPP, and I only know the name not the id for that.
Edit: ah, that works only for non-federated communities: https://slrpnk.net/api/v3/community?name=farming
or with the full address: https://slrpnk.net/api/v3/community?name=foss@beehaw.org
No, how can I list the details of a specific community that I know the name off? GetCommunity just returns a blank page and list doesn’t seem to allow specifying a specific community.