class Sensit::Api::Data
Get the value of a specific field within a feed
topic_id - The key for the parent topic feed_id - The id of the parent feed id - The key of the specific field
Public Class Methods
new(topic_id, feed_id, id, client)
click to toggle source
# File lib/sensit/api/data.rb, line 12 def initialize(topic_id, feed_id, id, client) @topic_id = topic_id @feed_id = feed_id @id = id @client = client end
Public Instance Methods
find(options = {})
click to toggle source
Requires authorization of read_any_data, or read_application_data. ‘/topics/:topic_id/feeds/:feed_id/data/:id’ GET
# File lib/sensit/api/data.rb, line 22 def find(options = {}) body = options.has_key?(:query) ? options[:query] : {} response = @client.get "/topics/#{@topic_id}/feeds/#{@feed_id}/data/#{@id}", body, options return response end
update(options = {})
click to toggle source
Update a specific value of a field within a feed with the data passed in. Requires authorization of read_any_data, or read_application_data. ‘/topics/:topic_id/feeds/:feed_id/data/:id’ PUT
# File lib/sensit/api/data.rb, line 33 def update(options = {}) body = options.has_key?(:body) ? options[:body] : {} response = @client.put "/topics/#{@topic_id}/feeds/#{@feed_id}/data/#{@id}", body, options return response end