Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in / Register
Toggle navigation
Menu
Open sidebar
佳 邓
Gitlab4j Api
Commits
5e8ee196
Commit
5e8ee196
authored
Apr 15, 2017
by
Greg Messner
Committed by
GitHub
Apr 15, 2017
Browse files
Added more code samples.
parent
6f332681
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
5e8ee196
...
...
@@ -85,6 +85,19 @@ ProjectApi:
// Get a list of accessible projects
public
List
<
Project
>
projects
=
gitLabApi
.
getProjectApi
().
getProjects
();
```
```
java
// Create a new project
Project
projectSpec
=
new
Project
()
.
withName
(
"my-project)
.withDescription("
My
project
for
demonstration
.
"
)
.
withIssuesEnabled
(
true
)
.
withMergeRequestsEnabled
(
true
)
.
withWikiEnabled
(
true
)
.
withSnippetsEnabled
(
true
)
.
withPublic
(
true
);
Project
newProject
=
gitLabApi
.
getProjectApi
().
createProject
(
projectSpec
);
```
RepositoryApi:
```
java
...
...
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