Commit 800f9e8c authored by Roman Lacko's avatar Roman Lacko
Browse files

Update pod-GitLab-Namespaces.md

parent 096b161f
# NAME
GitLab::Namespaces - extension for Namespaces API
`GitLab::Namespaces` - extension for Namespaces API
See [GitLab API -- Namespaces](http://doc.gitlab.com/ce/api/namespaces.html) for details and response formats.
# SYNOPSIS
use GitLab::API;
use GitLab::Namespaces;
```{.pl}
use GitLab::API;
use GitLab::Namespaces;
my $api = GitLab::API->new();
my $api = GitLab::API->new(...);
# get namespaces exposed to user john.doe
$api->sudo("john.doe");
# get namespaces exposed to user john.doe
$api->sudo("john.doe");
my $namespaces = $api->namespaces(search => "group1");
my $namespaces = $api->namespaces(search => "group1");
```
# VERSION
......@@ -25,28 +27,33 @@ Checked 2016-09-29 for GitLab CE `v8.12.1`.
From GitLab API: _"Usernames and groupnames fall under a special category called namespaces."_
- namespaces()
- `namespaces()`
$namespaces = $gitlab->namespaces();
$namespaces = $gitlab->namespaces(search => $what);
```{.pl}
$namespaces = $gitlab->namespaces();
$namespaces = $gitlab->namespaces(search => $what);
```
Returns all namespaces for currently authenticated user.
If an optional argument `search` is used, only those namespaces that contain the requested string are returned.
To get namespaces of user with login `$login`, you can do this:
$gitlab->sudo($login);
$namespaces = $gitlab->namespaces();
```{.pl}
$gitlab->sudo($login);
$namespaces = $gitlab->namespaces();
```
Note that the authenticated user must be an administrator to use ["sudo" in GitLab::API](https://metacpan.org/pod/GitLab::API#sudo).
If the user with login `$login` is an administrator, the call will return **all** namespaces.
Note that the authenticated user must be an administrator to use [`sudo` in GitLab::API](pod-GitLab-API.md#sudo).
Also, if the user is an administrator, the call returns **all** namespaces.
# 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.
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment