this post was submitted on 28 Nov 2021
22 points (100.0% liked)
Lemmy
12690 readers
53 users here now
Everything about Lemmy; bugs, gripes, praises, and advocacy.
For discussion about the lemmy.ml instance, go to [email protected].
founded 4 years ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
The HTTP docs are what you want: https://join-lemmy.org/api/classes/LemmyHttp.html#getPost
It tells you the full input and output types, and if you click the defined in link, it shows you the endpoint you can use for curl.
Example from above:
return this.wrapper(HttpType.Get, '/post', form);
We do it this way because the lemmy-js-client exactly matches what you need to build a client, and is completely auto-generated. Before we used to manually maintain other API docs, and it was a huge hassle to keep them updated.