How to create post with ruby api?


#1

Hello,

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).


(Joshua Rosenfeld) #2

Check out the source code:
discourse_api/posts.rb at master · discourse/discourse_api · GitHub

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


#3

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!


(Régis Hanol) #4