If you are writing a client, there is really no reason to browse instances using browser/lemmy-ui. Instead you can directly connect with your client to the api of any instance. Then when you want to interact with any object (eg vote, write a post, subscribe), you take the value of ap_id
field (on post, comment) or actor_id
field (user, community, site), and pass that to resolve_object.
What resolve_object does is essentially the command below, and then transform the data to store it in Lemmy db. Note that each fetchable object has an id
, and that is where you can resolve it.
curl -H 'Accept: application/activity+json' https://lemmy.ml/post/472799 | jq
https://lemmy.perthchat.org/api/v3/resolve_object?q=https://lemmy.ml/post/472799
This fails because it was posted on lemmygrad.ml, which is blocked on perthchat.
To fetch comments, the url should look like this: https://sopuli.xyz/comment/104283