From 1cb5122e74b2f1dc4399eb453735642bbda431d2 Mon Sep 17 00:00:00 2001 From: dingguodong Date: Mon, 26 Jul 2021 09:31:59 +0800 Subject: [PATCH] + Add apiGetSingleProject func. --- module/gitlab/model.php | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/module/gitlab/model.php b/module/gitlab/model.php index 8a5fa49bd4..6dff7d30df 100644 --- a/module/gitlab/model.php +++ b/module/gitlab/model.php @@ -382,6 +382,20 @@ class gitlabModel extends model return $allResults; } + /** + * Get single project by API. + * + * @param int $gitlabID + * @param int $projectID + * @access public + * @return object + */ + public function apiGetSingleProject($gitlabID, $projectID) + { + $url = sprintf($this->getApiRoot($gitlabID), "/projects/$projectID"); + return json_decode(commonModel::http($url)); + } + /** * Get hooks. *