Method: Assistly::Client::Topic#create_topic
- Defined in:
- lib/assistly/client/topic.rb
#create_topic(name, *args) ⇒ Object
Creates a new topic
@param name [String] A topic name @option options [Hash] @example Creates a new topic Assistly.create_topic("name") Assistly.create_topic("name", :description => "description")
47 48 49 50 51 52 53 54 55 |
# File 'lib/assistly/client/topic.rb', line 47 def create_topic(name, *args) = args.last.is_a?(Hash) ? args.pop : {} response = post("topics",) if response['success'] return response['results']['topic'] else return response end end |