+ Add apiGetProjectMembers apiGetProjectMember functions.

This commit is contained in:
dingguodong
2021-09-03 14:52:51 +08:00
parent c80ce42a12
commit 82d9ac3b02
+30 -1
View File
@@ -493,7 +493,7 @@ class gitlabModel extends model
* @param int $gitlabID
* @param int $projectID
* @access public
* @return void
* @return object
*/
public function apiGetProjectUsers($gitlabID, $projectID)
{
@@ -501,6 +501,35 @@ class gitlabModel extends model
return json_decode(commonModel::http($url));
}
/**
* Get project all members(users and users in groups).
*
* @param int $gitlabID
* @param int $projectID
* @access public
* @return object
*/
public function apiGetProjectMembers($gitlabID, $projectID)
{
$url = sprintf($this->getApiRoot($gitlabID), "/projects/$projectID/members/all");
return json_decode(commonModel::http($url));
}
/**
* Get the member detail in project.
*
* @param int $gitlabID
* @param int $projectID
* @param int $userID
* @access public
* @return object
*/
public function apiGetProjectMember($gitlabID, $projectID, $userID)
{
$url = sprintf($this->getApiRoot($gitlabID), "/projects/$projectID/members/all/$userID");
return json_decode(commonModel::http($url));
}
/**
* Get single branch by API.
*