lib/discourse_api/api/topics.rb in discourse_api-0.8.1 vs lib/discourse_api/api/topics.rb in discourse_api-0.9.0

- old
+ new

@@ -9,9 +9,15 @@ .required(:title, :raw) .optional(:skip_validations, :category, :auto_track) post("/posts", args.to_h) end + def create_topic_action(args) + args = API.params(args) + .required(:topic_id, :post_action_type_id) + post("/post_actions", args.to_h.merge(flag_topic: true)) + end + def latest_topics(params={}) response = get('/latest.json', params) response[:body]['topic_list']['topics'] end