Class: TinCanApi::StatementsQuery
- Inherits:
-
Object
- Object
- TinCanApi::StatementsQuery
- Defined in:
- lib/tin_can_api/statements_query.rb
Instance Attribute Summary collapse
-
#activity_id ⇒ Object
Returns the value of attribute activity_id.
-
#agent ⇒ Object
Returns the value of attribute agent.
-
#ascending ⇒ Object
Returns the value of attribute ascending.
-
#format ⇒ Object
Returns the value of attribute format.
-
#limit ⇒ Object
Returns the value of attribute limit.
-
#registration ⇒ Object
Returns the value of attribute registration.
-
#related_activities ⇒ Object
Returns the value of attribute related_activities.
-
#related_agents ⇒ Object
Returns the value of attribute related_agents.
-
#stored_since ⇒ Object
Returns the value of attribute stored_since.
-
#stored_until ⇒ Object
Returns the value of attribute stored_until.
-
#verb_id ⇒ Object
Returns the value of attribute verb_id.
-
#version ⇒ Object
readonly
Returns the value of attribute version.
Instance Method Summary collapse
-
#initialize(&block) ⇒ StatementsQuery
constructor
A new instance of StatementsQuery.
- #parameter_map ⇒ Object
Constructor Details
#initialize(&block) ⇒ StatementsQuery
Returns a new instance of StatementsQuery.
9 10 11 12 13 14 |
# File 'lib/tin_can_api/statements_query.rb', line 9 def initialize(&block) self.version = TCAPIVersion::V101 if block_given? block[self] end end |
Instance Attribute Details
#activity_id ⇒ Object
Returns the value of attribute activity_id.
6 7 8 |
# File 'lib/tin_can_api/statements_query.rb', line 6 def activity_id @activity_id end |
#agent ⇒ Object
Returns the value of attribute agent.
6 7 8 |
# File 'lib/tin_can_api/statements_query.rb', line 6 def agent @agent end |
#ascending ⇒ Object
Returns the value of attribute ascending.
7 8 9 |
# File 'lib/tin_can_api/statements_query.rb', line 7 def ascending @ascending end |
#format ⇒ Object
Returns the value of attribute format.
7 8 9 |
# File 'lib/tin_can_api/statements_query.rb', line 7 def format @format end |
#limit ⇒ Object
Returns the value of attribute limit.
7 8 9 |
# File 'lib/tin_can_api/statements_query.rb', line 7 def limit @limit end |
#registration ⇒ Object
Returns the value of attribute registration.
6 7 8 |
# File 'lib/tin_can_api/statements_query.rb', line 6 def registration @registration end |
#related_activities ⇒ Object
Returns the value of attribute related_activities.
6 7 8 |
# File 'lib/tin_can_api/statements_query.rb', line 6 def @related_activities end |
#related_agents ⇒ Object
Returns the value of attribute related_agents.
6 7 8 |
# File 'lib/tin_can_api/statements_query.rb', line 6 def @related_agents end |
#stored_since ⇒ Object
Returns the value of attribute stored_since.
7 8 9 |
# File 'lib/tin_can_api/statements_query.rb', line 7 def stored_since @stored_since end |
#stored_until ⇒ Object
Returns the value of attribute stored_until.
7 8 9 |
# File 'lib/tin_can_api/statements_query.rb', line 7 def stored_until @stored_until end |
#verb_id ⇒ Object
Returns the value of attribute verb_id.
5 6 7 |
# File 'lib/tin_can_api/statements_query.rb', line 5 def verb_id @verb_id end |
#version ⇒ Object (readonly)
Returns the value of attribute version.
5 6 7 |
# File 'lib/tin_can_api/statements_query.rb', line 5 def version @version end |
Instance Method Details
#parameter_map ⇒ Object
24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
# File 'lib/tin_can_api/statements_query.rb', line 24 def parameter_map params = {} params['agent'] = agent.serialize(version) if agent params['verb'] = verb_id.to_s if verb_id params['activity'] = activity_id.to_s if activity_id params['registration'] = registration if registration params['related_activities'] = if params['related_agents'] = if 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['format'] = format if format params['ascending'] = ascending if ascending params end |