Mark Sapiro writes:
On 4/1/23 16:33, Peter Knowles wrote:
That all being said, on a slight segway... Aside from using the REST API, is it practical or possible to manipulate the database directly? That is, in doing so would it just work or are there extra moving parts when an API request is issued?
It probably is possible, but I would definitely discourage it. The REST API should provide everything you need without your having to reimplement everything it does.
I think it would probably be a really heavy lift, because Mailman internally uses an object-relational manager, SQAlchemy. We occasionally change the schema, and SQAalchemy will automatically upgrade the database schema. You would have to handle that by hand in your code.
I would recommend you get the sources for mailmanclient (https://gitlab.com/mailman/mailmanclient, iirc). They're quite repetitive, you wouldn't want to literally port them, but once you're familiar with the scaffolding and a couple of the commands you should be able to write a lot of PHP really fast to cover the REST endpioints you most need in a library with an API to your taste.
Steve
participants (1)
-
Stephen J. Turnbull