How to create post with ruby api?


Can somebody tell me how to create post with ruby api?

It seems that there is only create topic api in discourse_api gem (GitHub - discourse/discourse_api: Ruby API for Discourse).

Check out the source code:

I’d assume create_post is what you’re looking for, but I’m not a Ruby expert.


Thanks, it just works!

Better if I can get the latest inserted topic_id when I call create_topic method. I’ll have a try!

1 Like