I would like to write a Chrome extension which makes boosting toots on another instance more seamless.
I am looking at https://docs.joinmastodon.org/methods/statuses/#boost
It says POST /api/v1/statuses/:id/reblog
About :id
it says "The ID of the Status in the database."
How do I find this for a remote toot?
Use the search API to locate the status based on its URL, like this:
If the URL is valid, you will have an item inside
statuses
object and you can pick itsid
from there. Path would bestatuses[0].id
, but ensurestatuses
length is greater than 0 to confirm the URL is valid.Use that ID to make the request to the boost method.