Is there somewhere that has a language-agnostic description of Lemmy’s APIs?
Everything about Lemmy; bugs, gripes, praises, and advocacy.
For discussion about the lemmy.ml instance, go to !email@example.com.
deleteCommunity()is “Delete a community.” In what circumstances may I delete a community? What authentication needs to be performed before this function is called? What response should I expect if the deletion failed?
RemoveCommunity? Okay, so only an admin can remove a community, but like… what do these things actually do?
likePosttells you part of the URL, and the method. You have to click through to
CreatePostLiketo see the shape of the request body, and
PostView) to see the expected response… but only on success. For errors, I have no idea. I got down into
wrapper(), but it looks like it simply may not implement error handling at all. Figuring out the URL is another slog, this time through
buildFullUrl()and the constructor.
Certainly, writing documentation is work. But the decision to stop doing it externalizes and multiplies the hassle – it shifts from the Lemmy developers needing to maintain documentation once, to any programmer wishing to interact with Lemmy needing to RE the JS client, every time.
Autogenerating Swagger documentation may be one way to reduce the burden on the Lemmy maintainers.
Click on the form, and it tells you exactly what are the required fields, and the output type for what you’re getting back.
Except for the exact endpoints (which are linked directly in every method description), every single input and output is fully expandable and described.
It doesn’t require reverse engineering anything, just click a few links.