@@ -20,14 +20,17 @@ namespace TinCan
2020{
2121 public class StatementsQuery
2222 {
23+ // TODO: put in common location
24+ private const String ISODateTimeFormat = "o" ;
25+
2326 public Agent agent { get ; set ; }
2427 public Uri verbId { get ; set ; }
2528 public Uri activityId { get ; set ; }
2629 public Nullable < Guid > registration { get ; set ; }
2730 public Nullable < Boolean > relatedActivities { get ; set ; }
2831 public Nullable < Boolean > relatedAgents { get ; set ; }
29- public DateTime since { get ; set ; }
30- public DateTime until { get ; set ; }
32+ public Nullable < DateTime > since { get ; set ; }
33+ public Nullable < DateTime > until { get ; set ; }
3134 public Nullable < Int32 > limit { get ; set ; }
3235 public StatementsQueryResultFormat format { get ; set ; }
3336 public Nullable < Boolean > ascending { get ; set ; }
@@ -48,7 +51,7 @@ public Dictionary<String, String> ToParameterMap (TCAPIVersion version)
4851 }
4952 if ( activityId != null )
5053 {
51- result . Add ( "activityId " , activityId . ToString ( ) ) ;
54+ result . Add ( "activity " , activityId . ToString ( ) ) ;
5255 }
5356 if ( registration != null )
5457 {
@@ -62,6 +65,14 @@ public Dictionary<String, String> ToParameterMap (TCAPIVersion version)
6265 {
6366 result . Add ( "related_agents" , relatedAgents . Value . ToString ( ) ) ;
6467 }
68+ if ( since != null )
69+ {
70+ result . Add ( "since" , since . Value . ToString ( ISODateTimeFormat ) ) ;
71+ }
72+ if ( until != null )
73+ {
74+ result . Add ( "until" , until . Value . ToString ( ISODateTimeFormat ) ) ;
75+ }
6576 if ( limit != null )
6677 {
6778 result . Add ( "limit" , limit . ToString ( ) ) ;
0 commit comments