mozz Admin , (edited )
mozz avatar

API docs are at https://lemmy.readme.io/reference/get_post-list - I haven't tested this, but to me it looks like you can get raw results for what you've liked by doing this (for $server set to whatever server address):

  1. Open web developer tools and go to the "Network" tab
  2. Load a page of Lemmy while logged in
  3. Right-click on one of the network requests, select Copy Value -> Copy as curl
  4. Paste the resulting value to command line in a place that has curl; that'll give you a request that has the right auth tokens and etc
  5. Backspace over the actual URL so you can replace it with the API calls you need
  6. Use --request GET --url "https://$server/api/v3/post/list?liked_only=true" --header 'accept: application/json' to get liked posts as JSON
  7. Use --request GET --url "https://$server/api/v3/comment/list?liked_only=true" --header 'accept: application/json' to get liked comments as JSON

Edit: Fixed comment link

56_ ,
@56_@lemmy.ml avatar

A good starting point, but since they are GET requests, there is no reason to leave the browser.

You can visit the links directly, such as (I filled in OP's instance):

I've heard from somewhere that chrome doesn't render JSON nicely, so make sure to use firefox!

Other interesting parameters are saved_only and disliked_only.

mozz Admin ,
mozz avatar

Oh, true dat - yeah that is much more convenient.

aprentic OP ,

Thanks. Those look like they're likes per post or comment rather than per user but it's pretty close to what I'm looking for.
I'm gonna test that out when I get back from my conference!

mozz Admin ,
mozz avatar

You need to be logged in -- for me it shows all the posts / comments that I've liked. See the fix that the other person posted though; the comment link should be https://lemm.ee/api/v3/comment/list?liked_only=true

mozz Admin ,
mozz avatar

API docs are at https://lemmy.readme.io/reference/get_post-list - I haven't tested this, but to me it looks like you can (for $server set to whatever server address):

  1. Open web developer tools and go to the "Network" tab
  2. Load a page of Lemmy while logged in
  3. Right-click on one of the network requests, select Copy Value -> Copy as curl
  4. Paste the resulting value to command line in a place that has curl; that'll give you a request that has the right auth tokens and etc
  5. Backspace over the actual URL so you can replace it with the API calls you need
  6. Use --request GET --url "https://$server/api/v3/post/list?liked_only=true" --header 'accept: application/json' to get liked posts as JSON
  7. Use --request GET --url "https://$server/api/v3/comment/list?GetComments=liked_only=true" --header 'accept: application/json' to get liked comments as JSON
  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • lemmy_support@lemmy.ml
  • test
  • worldmews
  • mews
  • All magazines