this post was submitted on 29 Jun 2024
47 points (98.0% liked)

Programming

17101 readers
65 users here now

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

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
 

I've seen these posts

But actually I haven't been able to figure out exactly how to get the posts a user has made in lemmy. I've seen this page but I think this is for a different lemmy instance, I'm not sure https://join-lemmy.org/api/interfaces/GetPosts.html

Can anyone point me to a documentation on how to make this?

you are viewing a single comment's thread
view the rest of the comments
[–] refalo@programming.dev 26 points 3 months ago* (last edited 3 months ago) (9 children)

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.

[–] onlinepersona@programming.dev 4 points 3 months ago (7 children)

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

[–] refalo@programming.dev 5 points 3 months ago* (last edited 3 months ago) (6 children)

This is still written from a javascript perspective and assumes many things that are not true when using other approaches to calling the endpoints.

[–] expr@programming.dev 0 points 3 months ago

Confused what you mean. OpenAPI has nothing to do with JS.

load more comments (5 replies)
load more comments (5 replies)
load more comments (6 replies)