|
|
# NAME
|
|
|
|
|
|
`GitLab::Groups` - implements group API calls
|
|
|
|
|
|
See [GitLab API -- Groups](http://doc.gitlab.com/ce/api/groups.html) for details and
|
|
|
response formats.
|
|
|
|
|
|
# VERSION
|
|
|
|
|
|
Implements API calls for GitLab CE `v8.10.0`.
|
|
|
Checked 2016-09-29 for GitLab CE `v8.12.1`.
|
|
|
|
|
|
# DESCRIPTION
|
|
|
|
|
|
## Notation
|
|
|
|
|
|
Please see the documentation for the [`GitLab::Users`](pod-GitLab-Users.md) module.
|
|
|
|
|
|
Note that not all optional arguments are listed.
|
|
|
Please refer to the official documentation for the full list.
|
|
|
|
|
|
## Group CRUD operations
|
|
|
|
|
|
- `groups()`
|
|
|
|
|
|
```{.pl}
|
|
|
$groups = $gitlab->groups( [:search] );
|
|
|
```
|
|
|
|
|
|
Returns a list of groups.
|
|
|
An optional parameter `search` can be used to filter the list by substring match on `name`.
|
|
|
|
|
|
- `group_details()`
|
|
|
|
|
|
```{.pl}
|
|
|
$details = $gitlab->group_details( :gid );
|
|
|
```
|
|
|
|
|
|
Returns details about a group with the given `gid`.
|
|
|
|
|
|
- `group_create()`
|
|
|
|
|
|
```{.pl}
|
|
|
$group = $gitlab->group_create( :name, :path, [:description], [:visibility_level] );
|
|
|
```
|
|
|
|
|
|
Creates a new group. Required arguments are
|
|
|
|
|
|
| argument | description |
|
|
|
| -------- | ----------- |
|
|
|
| `name` | the name of the group |
|
|
|
| `path` | the path for the group (must be unique) |
|
|
|
|
|
|
In addition, the following _optional_ arguments can be specified:
|
|
|
|
|
|
| argument | description |
|
|
|
| -------- | ----------- |
|
|
|
| `description` | group's description |
|
|
|
| `visibility_level` | see [GitLab](pod-GitLab.md) module for possible values |
|
|
|
|
|
|
- `group_update()`
|
|
|
|
|
|
```{.pl}
|
|
|
$group = $gitlab->group_update( :gid );
|
|
|
```
|
|
|
|
|
|
Updates the grup with the given `gid`.
|
|
|
Takes same arguments as `group_create`, except they are all optional.
|
|
|
|
|
|
- `group_delete()`
|
|
|
|
|
|
```{.pl}
|
|
|
$gitlab->group_delete( :gid );
|
|
|
```
|
|
|
|
|
|
Deletes the group with the given `gid`.
|
|
|
|
|
|
## Group members
|
|
|
|
|
|
- `group_members()`
|
|
|
|
|
|
```{.pl}
|
|
|
$members = $gitlab->group_members( :gid );
|
|
|
```
|
|
|
|
|
|
Returns a list of members in the grup with the specified `gid`.
|
|
|
|
|
|
- `group_add_member()`
|
|
|
|
|
|
```{.pl}
|
|
|
$gitlab->group_add_member( :gid, :user_id, :access_level );
|
|
|
```
|
|
|
|
|
|
Adds a user with `user_id` to the group with the given `gid` with the specified `access_level`.
|
|
|
See [GitLab](pod-GitLab.md) module for possible access level values.
|
|
|
|
|
|
- `group_update_member()`
|
|
|
|
|
|
```{.pl}
|
|
|
$gitlab->group_update_member( :gid, :user_id, :access_level );
|
|
|
```
|
|
|
|
|
|
For user with the given `user_id` the function changes his `access_level` in the group with the specified `gid`.
|
|
|
|
|
|
- `group_delete_member()`
|
|
|
|
|
|
```{.pl}
|
|
|
$gitlab->group_delete_member( :gid, :user_id );
|
|
|
```
|
|
|
|
|
|
Removes the user with `user_id` from the group with the specified `gid`.
|
|
|
|
|
|
## Group projects and transfer
|
|
|
|
|
|
- `group_get_projects()`
|
|
|
|
|
|
```{.pl}
|
|
|
$projects = $gitlab->group_get_projects( :gid );
|
|
|
```
|
|
|
|
|
|
Returns a list of projects owned by the group with the given `gid`.
|
|
|
|
|
|
- `transfer_project_to_group()`
|
|
|
|
|
|
```{.pl}
|
|
|
$gitlab->transfer_project_to_group( :gid, :projid );
|
|
|
```
|
|
|
|
|
|
Moves the project with `projid` to the namespace of the group with the given `gid`.
|
|
|
|
|
|
__This method is available only for administrators.__
|
|
|
|
|
|
# AUTHOR
|
|
|
|
|
|
Roman Lacko <[`xlacko1@fi.muni.cz`](mailto:xlacko1@fi.muni.cz)>
|
|
|
|
|
|
# SEE ALSO
|
|
|
|
|
|
- [GitLab](pod-GitLab.md)
|
|
|
|
|
|
Wrapper around [GitLab::API](pod-GitLab-API.md) and other `GitLab::*` modules. |