tonzyl / mastbookmarksrss

A little script that fetches Mastodon bookmarks through the API and transforms them into a RSS feed
Creative Commons Zero v1.0 Universal
7 stars 0 forks source link

Feature request: images, older bookmarks #1

Closed jfou closed 9 months ago

jfou commented 9 months ago

Thank you for sharing this - seems to work well.

This might be a config problem on my end - so if these features are already present, please ignore.

Background OS: Win11 Reader: Thunderbird location of php file: hosted on personal website number of bookmarks downloaded: 20

Feature request

  1. downloading of images
  2. downloading all bookmarks (currently stops at 2 months for me)

Thanks again!

tonzyl commented 9 months ago

Hi Jeremy. I think the default max number of returned items through the API is 20. You can set a higher number, but that maxes out at 40 IIRC from the API docs. Beyond that you'd need to do multiple calls with offsets I suppose. In my case, as I have very strict content deletion settings on my personal instance, there were just a few bookmarks to fetch, and moving forward it will catch them all. So I'm fine for my use case, but you might want to tinker.

As to media, they are served through a different api and I haven't considered including that.

jfou commented 9 months ago

Thank you, Ton, for the clear answer!

Since I'm trying to find a good way to make a searchable archive locally, I'm playing catch-up. Fetching 20 in the future will be fine!

At your convenience (a key point!), could you either a) add a comment in the code that explains how to change that default to 40 and do the offsets OR 2) post a link that is more digestible for non-experts than https://docs.joinmastodon.org/methods/bookmarks/#query-parameters.

Basically, I don't understand from that resource where to put limit=40 or the syntax for multiple calls with offsets (to be gentle on my server). Search engines aren't helping me, sadly.

tonzyl commented 9 months ago

I've added how to increase the limit to 40. I've not added pagination as it requires processing a different part of the response received from the API call, but have added a comment about it.