class TinCanApi::StatementsQueryV095

Attributes

actor[RW]
ascending[RW]
authoritative[RW]
context[RW]
instructor[RW]
limit[RW]
object[RW]
registration[RW]
sparse[RW]
stored_since[RW]
stored_until[RW]
verb_id[R]
version[R]

Public Class Methods

new(&block) click to toggle source
# File lib/tin_can_api/statements_query_v095.rb, line 9
def initialize(&block)
  self.version = TCAPIVersion::V095
  if block_given?
    block[self]
  end
end

Public Instance Methods

parameter_map() click to toggle source
# File lib/tin_can_api/statements_query_v095.rb, line 24
def parameter_map
  params = {}
  params['verb'] = verb_id.to_s if verb_id
  params['object'] = object.serialize(version) if object
  params['registration'] = registration if registration
  params['context'] = context if context
  params['actor'] = actor if actor
  params['since'] = stored_since.strftime('%FT%T%:z') if stored_since
  params['until'] = stored_until.strftime('%FT%T%:z') if stored_until
  params['limit'] = limit if limit
  params['authoritative'] = authoritative if authoritative
  params['sparse'] = sparse if sparse
  params['instructor'] = instructor.serialize(version) if instructor
  params['ascending'] = ascending if ascending

  params
end
verb_id=(value) click to toggle source
# File lib/tin_can_api/statements_query_v095.rb, line 16
def verb_id=(value)
  if value.is_a?(Verb)
    @verb_id = value.id
  else
    @verb_id = Addressable::URI.parse(value)
  end
end