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

See Also:

Supported formats:

  • :json

Requires Authentication:

  • true



47
48
49
50
51
52
53
54
55
# File 'lib/assistly/client/topic.rb', line 47

def create_topic(name, *args)
  options = args.last.is_a?(Hash) ? args.pop : {}
  response = post("topics",options)
  if response['success']
    return response['results']['topic']
  else
    return response
  end
end