public function addRole($projectId, $roleId, $user = null, $group = null)
    {
        $parameters = [];
        if ((is_null($user) && is_null($group)) || (!is_null($user) && !is_null($group))) {
            throw new EndpointParameterException('User or group should be given');
        } elseif (!is_null($user)) {
            $parameters['user'] = $user;
        } else {
            $parameters['group'] = $group;
        }

        return $this->apiClient->callEndpoint(
            sprintf('%s/%s/role/%s', self::ENDPOINT, $projectId, $roleId),
            $parameters,
            null,
            HttpMethod::REQUEST_POST
        );
    }
public function addRole($projectId, $roleId, $user = null, $group = null)
    {
        $parameters = [];
        if ((is_null($user) && is_null($group)) || (!is_null($user) && !is_null($group))) {
            throw new EndpointParameterException('User or group should be given');
        } elseif (!is_null($user)) {
            $parameters['user'] = $user;
        } else {
            $parameters['group'] = $group;
        }

        return $this->apiClient->callEndpoint(
            sprintf('%s/%s/role/%s', self::ENDPOINT, $projectId, $roleId),
            $parameters,
            null,
            HttpMethod::REQUEST_POST
        );
    }
public function addRole ( $ projectId , $ roleId , $ user = null , $ group = null ) { $ parameters = [ ] ; if ( ( is_null ( $ user ) && is_null ( $ group ) ) || ( ! is_null ( $ user ) && ! is_null ( $ group ) ) ) { throw new EndpointParameterException ( 'User or group should be given' ) ; } elseif ( ! is_null ( $ user ) ) { $ parameters [ 'user' ] = $ user ; } else { $ parameters [ 'group' ] = $ group ; } return $ this -> apiClient -> callEndpoint ( sprintf ( '%s/%s/role/%s' , self :: ENDPOINT , $ projectId , $ roleId ) , $ parameters , null , HttpMethod :: REQUEST_POST ) ; }
Add an actor to a project role.

@param $projectId
@param $roleId
@param null|string $user
@param null|string $group
@throws \Bluetea\Api\Exception\EndpointParameterException
@return mixed
Add an actor to a project role .