diff --git a/Runtime/Libs/Dev.Dres.ClientApi.dll b/Runtime/Libs/Dev.Dres.ClientApi.dll index 1c9751d..949d9c5 100755 Binary files a/Runtime/Libs/Dev.Dres.ClientApi.dll and b/Runtime/Libs/Dev.Dres.ClientApi.dll differ diff --git a/Runtime/Libs/Dev.Dres.ClientApi.xml b/Runtime/Libs/Dev.Dres.ClientApi.xml index ea07669..f41aff7 100644 --- a/Runtime/Libs/Dev.Dres.ClientApi.xml +++ b/Runtime/Libs/Dev.Dres.ClientApi.xml @@ -643,6 +643,72 @@ Enum IMAGE for value: IMAGE + + + RankedAnswer + + + + + Initializes a new instance of the class. + + + + + Initializes a new instance of the class. + + answer (required). + rank. + + + + Gets or Sets Answer + + + + + Gets or Sets Rank + + + + + Returns the string presentation of the object + + String presentation of the object + + + + Returns the JSON string presentation of the object + + JSON string presentation of the object + + + + Returns true if objects are equal + + Object to be compared + Boolean + + + + Returns true if RankedAnswer instances are equal + + Instance of RankedAnswer to be compared + Boolean + + + + Gets the hash code + + Hash code + + + + To validate all properties of the instance + + Validation context + Validation Result + ApiViewerInfo @@ -1649,7 +1715,7 @@ Initializes a new instance of the class. - + Initializes a new instance of the class. @@ -4466,90 +4532,6 @@ Enum EXTERNALVIDEO for value: EXTERNAL_VIDEO - - - QueryResult - - - - - Initializes a new instance of the class. - - - - - Initializes a new instance of the class. - - item (required). - segment. - frame. - score. - rank. - - - - Gets or Sets Item - - - - - Gets or Sets Segment - - - - - Gets or Sets Frame - - - - - Gets or Sets Score - - - - - Gets or Sets Rank - - - - - Returns the string presentation of the object - - String presentation of the object - - - - Returns the JSON string presentation of the object - - JSON string presentation of the object - - - - Returns true if objects are equal - - Object to be compared - Boolean - - - - Returns true if QueryResult instances are equal - - Instance of QueryResult to be compared - Boolean - - - - Gets the hash code - - Hash code - - - - To validate all properties of the instance - - Validation context - Validation Result - Defines ApiEvaluationType @@ -5788,7 +5770,7 @@ Thrown when fails to make API call The evaluation ID. Session Token (optional) - ApiTaskTemplateInfo + ApiClientTaskTemplateInfo @@ -5800,7 +5782,7 @@ Thrown when fails to make API call The evaluation ID. Session Token (optional) - ApiResponse of ApiTaskTemplateInfo + ApiResponse of ApiClientTaskTemplateInfo @@ -5815,7 +5797,7 @@ The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) - Task of ApiTaskTemplateInfo + Task of ApiClientTaskTemplateInfo @@ -5828,7 +5810,7 @@ The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) - Task of ApiResponse (ApiTaskTemplateInfo) + Task of ApiResponse (ApiClientTaskTemplateInfo) @@ -5912,7 +5894,7 @@ Thrown when fails to make API call The evaluation ID. Session Token (optional) - ApiTaskTemplateInfo + ApiClientTaskTemplateInfo @@ -5921,7 +5903,7 @@ Thrown when fails to make API call The evaluation ID. Session Token (optional) - ApiResponse of ApiTaskTemplateInfo + ApiResponse of ApiClientTaskTemplateInfo @@ -5931,7 +5913,7 @@ The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) - Task of ApiTaskTemplateInfo + Task of ApiClientTaskTemplateInfo @@ -5941,7 +5923,7 @@ The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) - Task of ApiResponse (ApiTaskTemplateInfo) + Task of ApiResponse (ApiClientTaskTemplateInfo) @@ -6390,101 +6372,109 @@ Represents a collection of functions to interact with the API endpoints - + - Accepts query logs from participants + Accepts query logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) SuccessStatus - + - Accepts query logs from participants + Accepts query logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) ApiResponse of SuccessStatus - + - Accepts result logs from participants. + Accepts result logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) SuccessStatus - + - Accepts result logs from participants. + Accepts result logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) ApiResponse of SuccessStatus - + - Accepts query logs from participants + Accepts query logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) Task of SuccessStatus - + - Accepts query logs from participants + Accepts query logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) Task of ApiResponse (SuccessStatus) - + - Accepts result logs from participants. + Accepts result logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) Task of SuccessStatus - + - Accepts result logs from participants. + Accepts result logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) @@ -6552,77 +6542,85 @@ Header field value. - + - Accepts query logs from participants + Accepts query logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) SuccessStatus - + - Accepts query logs from participants + Accepts query logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) ApiResponse of SuccessStatus - + - Accepts query logs from participants + Accepts query logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) Task of SuccessStatus - + - Accepts query logs from participants + Accepts query logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) Task of ApiResponse (SuccessStatus) - + - Accepts result logs from participants. + Accepts result logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) SuccessStatus - + - Accepts result logs from participants. + Accepts result logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) ApiResponse of SuccessStatus - + - Accepts result logs from participants. + Accepts result logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) Task of SuccessStatus - + - Accepts result logs from participants. + Accepts result logs from participants for the specified evaluation. Thrown when fails to make API call + The evaluation ID. Session Token (optional) Cancellation Token to cancel request (optional) diff --git a/Runtime/Scripts/Dres/UnityClient/DresClient.cs b/Runtime/Scripts/Dres/UnityClient/DresClient.cs index fb081b2..8a30a8f 100644 --- a/Runtime/Scripts/Dres/UnityClient/DresClient.cs +++ b/Runtime/Scripts/Dres/UnityClient/DresClient.cs @@ -122,12 +122,14 @@ public Task SubmitTextualResult(string text) /// The result set availability /// The results to log /// The events associated with these results + /// Manual override of the evaluation ID of the currently set evaluation. /// The success / failure state of the operation public Task LogResults(long timestamp, string sortType, string resultSetAvailability, - List results, List events) + List results, List events, [CanBeNull] string evaluationId = null) { + evaluationId ??= CurrentEvaluation.Id; return DresWrapper.LogResults(timestamp, sortType, resultSetAvailability, results, events, - UserDetails.SessionId); + UserDetails.SessionId, evaluationId); } /// @@ -137,10 +139,13 @@ public Task LogResults(long timestamp, string sortType, string re /// /// The client side timestamp of this log /// The events to log + /// Manual override of the evaluation ID of the currently set evaluation. /// The success / failure state of the operation - public Task LogQueryEvents(long timestamp, List events) + public Task LogQueryEvents(long timestamp, List events, + [CanBeNull] string evaluationId = null) { - return DresWrapper.LogQueryEvents(timestamp, events, UserDetails.SessionId); + evaluationId ??= CurrentEvaluation.Id; + return DresWrapper.LogQueryEvents(timestamp, events, UserDetails.SessionId, evaluationId); } } } \ No newline at end of file diff --git a/Runtime/Scripts/Dres/UnityClient/DresWrapper.cs b/Runtime/Scripts/Dres/UnityClient/DresWrapper.cs index 3030439..4575953 100644 --- a/Runtime/Scripts/Dres/UnityClient/DresWrapper.cs +++ b/Runtime/Scripts/Dres/UnityClient/DresWrapper.cs @@ -57,7 +57,7 @@ internal static Task> ListClientEvaluations(string return EvaluationClientApi.GetApiV2ClientEvaluationListAsync(session); } - internal static Task GetTaskInfo(string evaluationId, string session) + internal static Task GetTaskInfo(string evaluationId, string session) { return EvaluationClientApi.GetApiV2ClientEvaluationCurrentTaskByEvaluationIdAsync(evaluationId, session); } @@ -71,7 +71,8 @@ internal static Task GetTaskInfo(string evaluationId, strin /// The optional start (in milliseconds) of the submitted item /// The optional end (in milliseconds) of the submitted item /// The submission state on success / failure. - internal static Task SubmitV2(string session, string evaluationId, string item, long? start = null, + internal static Task SubmitV2(string session, string evaluationId, string item, + long? start = null, long? end = null) { var answerSets = new List @@ -146,10 +147,11 @@ internal static Task SubmitText(string text, string /// The state of success / failure of the log sending. /// A 404 if there is no ongoing competition for this session, a 403 if there is no such user internal static Task LogResults(long timestamp, string sortType, string resultSetAvailability, - List results, List events, string session) + List results, List events, string session, string evaluationId) { - var resultLog = new QueryResultLog(timestamp, sortType, resultSetAvailability, results, events); - return LogApi.PostApiV2LogResultAsync(session, resultLog); + var resultLog = new QueryResultLog(timestamp: timestamp, sortType: sortType, + resultSetAvailability: resultSetAvailability, results: results, events: events); + return LogApi.PostApiV2LogResultByEvaluationIdAsync(evaluationId, session, resultLog); } /// @@ -162,10 +164,10 @@ internal static Task LogResults(long timestamp, string sortType, /// The session id to which this log belongs /// The state of success / failure of the log sending. /// A 404 if there is no ongoing competition for this session, a 403 if there is no such user - internal static Task LogQueryEvents(long timestamp, List events, string session) + internal static Task LogQueryEvents(long timestamp, List events, string session, string evaluationId) { var queryEventLog = new QueryEventLog(timestamp, events); - return LogApi.PostApiV2LogQueryAsync(session, queryEventLog); + return LogApi.PostApiV2LogQueryByEvaluationIdAsync(evaluationId, session, queryEventLog); } } } \ No newline at end of file diff --git a/package.json b/package.json index 48e88c0..b02cfc2 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "dev.dres.unityclient", - "version": "1.2.0", + "version": "1.3.0", "displayName": "DRES Unity Client", "description": "An all-unity client for [DRES](https://github.com/dres-dev/DRES)", "unity": "2020.3",