declanbyrd / eleventy-plugin-mastoarchive

Eleventy plugin to expose your Mastodon posts as a global data object.
https://www.npmjs.com/package/eleventy-plugin-mastoarchive
12 stars 1 forks source link

Increase response size beyond the limit of 40 #1

Closed declanbyrd closed 1 year ago

declanbyrd commented 1 year ago

Anyone that tries to use the plugin but has more than 40 posts (excluding replies and reblogs) will have an incomplete archive.

This is due to the limit query parameter that defaults to 20 posts returned, but has a maximum of 40. https://docs.joinmastodon.org/methods/accounts/#query-parameters

Ideally there should be a way of fetching all the posts once possibly through a flag, that can then be removed on subsequent builds.

declanbyrd commented 1 year ago

Maybe compare the RSS feed length to the length of the API response?

declanbyrd commented 1 year ago

Maybe compare the RSS feed length to the length of the API response?

Looked into this, the RSS feed only returns the last 20 posts so won't give the full list of statuses.

Could always keep calling the API with a max_id until there are either no statuses or less than 40 statuses in the response.