Skip to content
GitLab
Projects
Groups
Topics
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Roman Lacko
gitlab_api
Commits
096b161f
Commit
096b161f
authored
Sep 29, 2016
by
Roman Lacko
Browse files
Update pod-GitLab-Groups.md
parent
5090dd03
Changes
1
Hide whitespace changes
Inline
Side-by-side
pod-GitLab-Groups.md
View file @
096b161f
# NAME
GitLab::Groups - implements group API calls
`
GitLab::Groups
`
- implements group API calls
See
[
GitLab API -- Groups
](
http://doc.gitlab.com/ce/api/groups.html
)
for details and
response formats.
...
...
@@ -14,102 +14,128 @@ Checked 2016-09-29 for GitLab CE `v8.12.1`.
## Notation
Please see the documentation for the
[
GitLab::Users
](
https://metacpan.org/
pod
/
GitLab
::
Users
)
module.
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()
-
`
groups()
`
$groups = $gitlab->groups( [:search] );
```{.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()
-
`
group_details()
`
$details = $gitlab->group_details( :gid );
```{.pl}
$details = $gitlab->group_details( :gid );
```
Returns details about a group with the given `gid`.
-
group
\
_
create()
-
`
group_create()
`
$group = $gitlab->group_create( :name, :path, [:description], [:visibility_level] );
```{.pl}
$group = $gitlab->group_create( :name, :path, [:description], [:visibility_level] );
```
Creates a new group. Required arguments are
name the name of the group,
path the path for the group (must be unique)
| 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:
description group's description
visibility_level see GitLab::API for possible values
| argument | description |
| -------- | ----------- |
| `description` | group's description |
| `visibility_level` | see [GitLab](pod-GitLab.md) module for possible values |
-
group
\
_
update()
-
`
group_update()
`
$group = $gitlab->group_update( :gid );
```{.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()
-
`
group_delete()
`
$gitlab->group_delete( :gid );
```{.pl}
$gitlab->group_delete( :gid );
```
Deletes the group with the given `gid`.
## Group members
-
group
\
_
members()
-
`
group_members()
`
$members = $gitlab->group_members( :gid );
```{.pl}
$members = $gitlab->group_members( :gid );
```
Returns a list of members in the grup with the specified `gid`.
-
group
\
_
add
\
_
member()
-
`
group_add_member()
`
$gitlab->group_add_member( :gid, :user_id, :access_level );
```{.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
::API](https://metacpan.org/
pod
/
GitLab
::API
) module for possible access level values.
See [GitLab
](
pod
-
GitLab
.md
) module for possible access level values.
-
group
\
_
update
\
_
member()
-
`
group_update_member()
`
$gitlab->group_update_member( :gid, :user_id, :access_level );
```{.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()
-
`
group_delete_member()
`
$gitlab->group_delete_member( :gid, :user_id );
```{.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()
-
`
group_get_projects()
`
$projects = $gitlab->group_get_projects( :gid );
```{.pl}
$projects = $gitlab->group_get_projects( :gid );
```
Returns a list of projects owned by the group with the given `gid`.
-
transfer
\
_
project
\
_
to
\
_
group()
-
`
transfer_project_to_group()
`
$gitlab->transfer_project_to_group( :gid, :projid );
```{.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._
_
_This method is available only for administrators._
_
# AUTHOR
Roman Lacko
<[xlacko1@fi.muni.cz](
https://metacpan.org/pod/
xlacko1@fi.muni.cz)>
Roman Lacko
<[
`
xlacko1@fi.muni.cz
`
](
mailto:
xlacko1@fi.muni.cz)>
# SEE ALSO
-
[
GitLab
](
https://metacpan.org/
pod
/
GitLab
)
-
[
GitLab
](
pod
-
GitLab
.md
)
Wrapper around [GitLab::API](
https://metacpan.org/
pod
/
GitLab
::
API) and other `GitLab::*` modules.
Wrapper around [GitLab::API](pod
-
GitLab
-
API
.md
) and other `GitLab::*` modules.
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment