Class: TinCanApi::StatementsQueryV095

Inherits:
Object
  • Object
show all
Defined in:
lib/tin_can_api/statements_query_v095.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(&block) ⇒ StatementsQueryV095

Returns a new instance of StatementsQueryV095.



9
10
11
12
13
14
# 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

Instance Attribute Details

#actorObject

Returns the value of attribute actor.



6
7
8
# File 'lib/tin_can_api/statements_query_v095.rb', line 6

def actor
  @actor
end

#ascendingObject

Returns the value of attribute ascending.



7
8
9
# File 'lib/tin_can_api/statements_query_v095.rb', line 7

def ascending
  @ascending
end

#authoritativeObject

Returns the value of attribute authoritative.



7
8
9
# File 'lib/tin_can_api/statements_query_v095.rb', line 7

def authoritative
  @authoritative
end

#contextObject

Returns the value of attribute context.



6
7
8
# File 'lib/tin_can_api/statements_query_v095.rb', line 6

def context
  @context
end

#instructorObject

Returns the value of attribute instructor.



7
8
9
# File 'lib/tin_can_api/statements_query_v095.rb', line 7

def instructor
  @instructor
end

#limitObject

Returns the value of attribute limit.



6
7
8
# File 'lib/tin_can_api/statements_query_v095.rb', line 6

def limit
  @limit
end

#objectObject

Returns the value of attribute object.



6
7
8
# File 'lib/tin_can_api/statements_query_v095.rb', line 6

def object
  @object
end

#registrationObject

Returns the value of attribute registration.



6
7
8
# File 'lib/tin_can_api/statements_query_v095.rb', line 6

def registration
  @registration
end

#sparseObject

Returns the value of attribute sparse.



7
8
9
# File 'lib/tin_can_api/statements_query_v095.rb', line 7

def sparse
  @sparse
end

#stored_sinceObject

Returns the value of attribute stored_since.



6
7
8
# File 'lib/tin_can_api/statements_query_v095.rb', line 6

def stored_since
  @stored_since
end

#stored_untilObject

Returns the value of attribute stored_until.



6
7
8
# File 'lib/tin_can_api/statements_query_v095.rb', line 6

def stored_until
  @stored_until
end

#verb_idObject

Returns the value of attribute verb_id.



5
6
7
# File 'lib/tin_can_api/statements_query_v095.rb', line 5

def verb_id
  @verb_id
end

#versionObject (readonly)

Returns the value of attribute version.



5
6
7
# File 'lib/tin_can_api/statements_query_v095.rb', line 5

def version
  @version
end

Instance Method Details

#parameter_mapObject



24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# 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