In a Support category thread titled “Best Practise for Using a Raspberry PI as Bot for Posting Updates in Discourse,” elRicharde seeks beginner-friendly guidance on setting up a bot to update Discourse posts based on physical switch states monitored via a Raspberry Pi. Pravi suggests using either an email receiver or the Discourse API, with elRicharde opting for the API approach and asking for beginner resources. fzngagan recommends the Ruby gem for API interaction, while Pravi shares helpful API documentation links. elRicharde reports progress: generating an API key, testing requests in Postman, and exporting the collection — noting a preference for Python over Ruby. Finally, elRicharde discovers pydiscourse, a Python library that works well for interacting with Discourse, and acknowledges that while Postman wasn’t strictly necessary, it helped understand the API’s logic. The thread concludes with a practical Python-based solution for API-driven Discourse updates.
I´m looking for the best way (or a good documented way / beginner guide) to set up a Bot Updating a Post in Discourse.
We want to use a Raspi to Check some Switches and depending on there state we want to update a Post in our Forum.
Edit: while thinking about the possibilities the API brings, I would prefer that solution.
Will start to dig now for informations about setting that up… any hints welcome.
Ok, I just found pydiscourse and that seems to work pretty good
So the Step setting everything up in Postman wasn´t necessary but helped to understand the logic of the api - so it wasn´t a complete waste of time
in short - if you want to interact with your discourse via python you can use pydiscourse by
(Based on original authors list and may be incomplete)
Marc Sibson
James Potter
Ben Lopatin
Daniel Zohar
Matheus Fernandes
Scott Nixon
Jason Dorweiler
Pierre-Alain Dupont
Karl Goetz
Alex Kerney
Gustav https://github.com/dkgv