Method: DiscourseApi::API::Topics#create_topic
- Defined in:
- lib/discourse_api/api/topics.rb
#create_topic(args = {}) ⇒ Object
:category OPTIONAL name of category, not ID :skip_validations OPTIONAL boolean :auto_track OPTIONAL boolean :created_at OPTIONAL seconds since epoch.
9 10 11 12 13 14 |
# File 'lib/discourse_api/api/topics.rb', line 9 def create_topic(args = {}) args = API.params(args) .required(:title, :raw) .optional(:skip_validations, :category, :auto_track, :created_at, :api_username, :tags) post("/posts", args.to_h) end |