class Sensit::Api::Topic
A topic is root that data is attached to. It is the equivalent of a source in searchlight/solink and acts as a table which has columns(Fields) and rows(Feeds).
Public Class Methods
# File lib/sensit/api/topic.rb, line 9 def initialize(client) @client = client end
Public Instance Methods
Requires authorization of manage_any_data, or manage_application_data. ‘/topics’ POST
topic - A hash containing the name/id of the topic (required) and a description of the topic.
# File lib/sensit/api/topic.rb, line 39 def create(topic, options = {}) body = options.has_key?(:body) ? options[:body] : {} body[:topic] = topic response = @client.post "/topics", body, options return response end
Requires authorization of manage_any_data, or manage_application_data. ‘/topics/:id’ DELETE
# File lib/sensit/api/topic.rb, line 64 def delete(options = {}) body = options.has_key?(:body) ? options[:body] : {} response = @client.delete "/topics/:id", body, options return response end
Requires authorization of read_any_data, or read_application_data. ‘/topics/:id’ GET
# File lib/sensit/api/topic.rb, line 27 def find(options = {}) body = options.has_key?(:query) ? options[:query] : {} response = @client.get "/topics/:id", body, options return response end
Requires authorization of read_any_data, or read_application_data. ‘/topics’ GET
# File lib/sensit/api/topic.rb, line 16 def list(options = {}) body = options.has_key?(:query) ? options[:query] : {} response = @client.get "/topics", body, options return response end
Requires authorization of manage_any_data, or manage_application_data. ‘/topics/:id’ PUT
topic - A hash containing the name/id of the topic (required) and a description of the topic.
# File lib/sensit/api/topic.rb, line 52 def update(topic, options = {}) body = options.has_key?(:body) ? options[:body] : {} body[:topic] = topic response = @client.put "/topics/:id", body, options return response end