Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'lib/api/project_statistics.rb')
-rw-r--r--lib/api/project_statistics.rb12
1 files changed, 10 insertions, 2 deletions
diff --git a/lib/api/project_statistics.rb b/lib/api/project_statistics.rb
index 3db8d20ebac..859e53b6981 100644
--- a/lib/api/project_statistics.rb
+++ b/lib/api/project_statistics.rb
@@ -10,10 +10,18 @@ module API
end
params do
- requires :id, type: String, desc: 'The ID of a project'
+ requires :id, types: [String, Integer], desc: 'The ID or URL-encoded path of the project'
end
resource :projects, requirements: API::NAMESPACE_OR_PROJECT_REQUIREMENTS do
- desc 'Get the list of project fetch statistics for the last 30 days'
+ desc 'Get the list of project fetch statistics for the last 30 days' do
+ success Entities::ProjectDailyStatistics
+ failure [
+ { code: 404, message: '404 Project Not Found' },
+ { code: 401, message: '401 Unauthorized' }
+ ]
+ tags %w[projects]
+ end
+
get ":id/statistics" do
statistic_finder = ::Projects::DailyStatisticsFinder.new(user_project)