From 44aa6b90ddde3a7babc6ed9f50d73040d6184789 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81bner=20Silva=20de=20Oliveira?= Date: Fri, 21 Mar 2014 06:18:19 -0300 Subject: added api method to return labels of a given project --- lib/api/projects.rb | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'lib/api/projects.rb') diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 4d48d2194f8..40b5ce86c93 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -215,6 +215,15 @@ module API @users = paginate @users present @users, with: Entities::User end + + # Get a labels list + # + # Example Request: + # GET /users + get ':id/labels' do + @labels = user_project.issues_labels + present @labels, with: Entities::Label + end end end end -- cgit v1.2.1 From e153469f31db106d0720e357a5e22431635f2b9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=81bner=20Silva=20de=20Oliveira?= Date: Sun, 23 Mar 2014 19:07:18 -0300 Subject: changed doc comment for get labels of a project --- lib/api/projects.rb | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'lib/api/projects.rb') diff --git a/lib/api/projects.rb b/lib/api/projects.rb index 40b5ce86c93..9d290c75ba9 100644 --- a/lib/api/projects.rb +++ b/lib/api/projects.rb @@ -216,10 +216,12 @@ module API present @users, with: Entities::User end - # Get a labels list + # Get a project labels # + # Parameters: + # id (required) - The ID of a project # Example Request: - # GET /users + # GET /projects/:id/labels get ':id/labels' do @labels = user_project.issues_labels present @labels, with: Entities::Label -- cgit v1.2.1