XF 2.0 Insert posts directly into database

I want to add new posts to a thread using 3rd party application. The easiest way I can think of is inserting data directly into the database. What tables/records should I insert and update? xf_post is obvious, but it's not enough as I can see.
 
I wouldn't recommend doing that.

My recommendation would be to instantiate the XF framework and use our Post / Thread Creator services to insert the content.
 
I wouldn't recommend doing that.

My recommendation would be to instantiate the XF framework and use our Post / Thread Creator services to insert the content.
Could you please show me a simple class with a method to create a new reply in a thread? Or recommend some addon, that implements this functionality? I find it very difficult to understand XF's structure.
 
Top Bottom