Follow

Has anybody played with the Mastodon API? It looks to be pretty straightforward but there's always a gotcha lurking. I hope to get some time to beat on it toward the end of the week. If I learn anything interesting, I'll report back here.

I've found Postman to be the most useful tool for exploring the API. cURL is still problematic -- I've followed carefully a couple tutorials with no success and I can't figure out why. A simple python script using the request library works well but isn't quite the explore and debug tool that Postman is.

Next up is hook up some sensor to an MCU, send data to a Raspberry Pi running Node-Red, then have N-R use the API to update my Mastodon status. Day job+holidays likely push that out to the new year.

Show thread

@lePetomaneAncien Im the admin of this instance. We are a fork of mastodon with quite a few special features. I did all the coding to bring those features in (though in many cases I pulled the features in from pull requests on core code).... So yea, obviously ive worked with the API and source before.

If you wanna play with our code here its all open source and we have some docker containers to make it easy to play with.

@freemo Thanks. I'm not good enough to dig into a large, complex code base. I just want to see if I can automate some actions like posting an update from an IOT-connected sensor.

Sign in to participate in the conversation
Qoto Mastodon

QOTO: Question Others to Teach Ourselves
An inclusive, Academic Freedom, instance
All cultures welcome.
Hate speech and harassment strictly forbidden.