annotation_dashboard/commit

ADDED: filter param to /api/annotate/dashboard/task

authorJacco van Ossenbruggen
Wed May 21 14:24:31 2014 +0200
committerJacco van Ossenbruggen
Wed May 21 14:24:31 2014 +0200
commit895329c500d188c42e467a9549e8c9814ea98e1c
treea5797cbd26fe46ba34fa771575dc35688a205f63
parent3679c3e34c42cf00965f52206059cbe811c24532
Diff style: patch stat
diff --git a/api/dashboard_api.pl b/api/dashboard_api.pl
index 3f63cd8..9b057a6 100644
--- a/api/dashboard_api.pl
+++ b/api/dashboard_api.pl
@@ -11,6 +11,11 @@
 :- http_handler(cliopatria(api/annotate/dashboard/task), http_api_dashboard_task, []).
 
 http_api_dashboard_task(Request) :-
-	http_parameters(Request, [task(Task, [])]),
-	find_task_properties(Task, Props),
+	http_parameters(Request,
+			[task(Task, [uri, description('URI of the task')]),
+			 filter(Filter, [default(ground),
+					 oneof([ground, number])
+					])
+			]),
+	find_task_properties(Task, Props, [filter(Filter)]),
 	reply_json(Props).