module Ohmage::API::Annotation

Public Instance Methods

annotation_delete(params = {}) click to toggle source

ohmage annotation/delete call @see github.com/ohmage/server/wiki/ @returns success/fail

# File lib/ohmage/annotation.rb, line 59
def annotation_delete(params = {})
  request = Ohmage::Request.new(self, :post, 'annotation/delete', params)
  request.perform
end
annotation_prompt_response_create(params = {}) click to toggle source

ohmage annotation/prompt_response/create call @see github.com/ohmage/server/wiki/ @returns [Array: Ohmage::Annotation objects] matching criteria and output format

# File lib/ohmage/annotation.rb, line 19
def annotation_prompt_response_create(params = {})
  request = Ohmage::Request.new(self, :post, 'annotation/prompt_response/create', params)
  request.perform
end
annotation_prompt_response_read(params = {}) click to toggle source

ohmage annotation/prompt_response/read call @see github.com/ohmage/server/wiki/ @returns [Array: Ohmage::Annotation objects] matching criteria and output format

# File lib/ohmage/annotation.rb, line 44
def annotation_prompt_response_read(params = {})
  request = Ohmage::Request.new(self, :post, 'annotation/prompt_response/read', params)
  # TODO: make a utility to abstract creation of array of base objects
  t = []
  request.perform[:data].each do |k, v|
    t << Ohmage::Annotation.new(k => v)
  end
  t
end
annotation_survey_response_create(params = {}) click to toggle source

ohmage annotation/survey_response/create call @see github.com/ohmage/server/wiki/ @returns [Array: Ohmage::Annotation objects] matching criteria and output format

# File lib/ohmage/annotation.rb, line 9
def annotation_survey_response_create(params = {})
  request = Ohmage::Request.new(self, :post, 'annotation/survey_response/create', params)
  request.perform
end
annotation_survey_response_read(params = {}) click to toggle source

ohmage annotation/survey_response/read call @see github.com/ohmage/server/wiki/ @returns [Array: Ohmage::Annotation objects] matching criteria and output format

# File lib/ohmage/annotation.rb, line 29
def annotation_survey_response_read(params = {})
  request = Ohmage::Request.new(self, :post, 'annotation/survey_response/read', params)
  # TODO: make a utility to abstract creation of array of base objects
  t = []
  request.perform[:data].each do |k, v|
    t << Ohmage::Annotation.new(k => v)
  end
  t
end