47
Question: How to curl the lemmy API?
(lemmy.world)
Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!
Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.
Hope you enjoy the instance!
Rules
Follow the wormhole through a path of communities !webdev@programming.dev
curl 'https://lemmy.world/api/v3/user?username=egeres&sort=New&page=1&limit=20' | jq .posts
https://join-lemmy.org/api/classes/LemmyHttp.html#getPersonDetails
The documentation is really terrible and the developers try to defend it anyways.
Some instances also employ cloudflare or other anti-ddos techniques that make automated API usage impossible.
Unofficial documentation using OpenAPI is here @egeres@lemmy.world .
Btw, the user interface uses the same API. Just open the web developer tools in your browser and look at the network tab.
Anti Commercial-AI license
This is still written from a javascript perspective and assumes many things that are not true when using other approaches to calling the endpoints.
Confused what you mean. OpenAPI has nothing to do with JS.