Skip to content

[9.18] Adding a single group membership endpoint #490

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions lib/Gitlab/Api/Groups.php
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,20 @@ public function members($id, array $parameters = [])
return $this->get('groups/'.$this->encodePath($id).'/members', $resolver->resolve($parameters));
}

/**
* @param int $group_id
* @param int $user_id
*
* @return mixed
*/
public function member($group_id, $user_id)
{
$resolver = $this->createOptionsResolver();
$resolver->setDefined('query');

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

$resolver is unused, too much copy-pasting and not testing your added functionality?

I personally would add @see annotation and link to api doc, so could verify what parameters are supported

return $this->get('groups/'.$this->encodePath($group_id).'/members/'.$this->encodePath($user_id));
}

/**
* @param int $group_id
* @param int $user_id
Expand Down