Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Roman Lacko
gitlab_api
Commits
ed3b23ff
Commit
ed3b23ff
authored
Oct 05, 2016
by
Roman Lacko
Browse files
fixed eols
parent
0836135a
Changes
2
Hide whitespace changes
Inline
Side-by-side
pod/GitLab-API.md
View file @
ed3b23ff
...
...
@@ -308,7 +308,7 @@ This request requires arguments `title`, `key` and `uid` (since it appears in th
The latter argument will be substituted in the path, the former two will be passed in the body of the request.
### Encoding
```{.pl}
my $project_by_id = {
method => "GET",
...
...
@@ -316,20 +316,20 @@ my $project_by_id = {
encode => [ qw(id) ],
};
```
From API documentation, this operation returns a project with the given `
id
`, which can be a numerical value or a string `
"NAMESPACE/PROJECT_NAME"
`.
Without the `
encode
` parameter in the template, the following request
```{.pl}
```{.pl}
$gitlab->project_by_id("user/project");
```
would result in the path `
gitlab_url/projects/user/project
` which is invalid.
The slash, as a reserved character, needs to be encoded using `
encode_required
` parameter for [`
URI::Encode
`](https://metacpan.org/pod/URI::Encode).
This option is enabled by specifying `
id
` in the `
encode
` parameter in the template.
Final URL in this case would be `
gitlab_url/projects/user%2Fproject
`.
### Pagination and optional arguments
```{.pl}
...
...
pod/GitLab.md
View file @
ed3b23ff
...
...
@@ -77,7 +77,7 @@ Import with `:utils` tag.
```{.pl}
$name = GitLab::project_visibility_name($code)
```
Translates a Project Visibility code to its string representation, i.e. _Privat_, _Internal_ and _Public_.
If the parameter does not represent a valid GitLab Project Visibility code, returns _Invalid_.
...
...
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