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
d4a2a25e
Commit
d4a2a25e
authored
Sep 19, 2019
by
Greg Messner
Browse files
Added SearchApi example (#425).
parent
8febc1e6
Changes
1
Hide whitespace changes
Inline
Side-by-side
README.md
View file @
d4a2a25e
...
...
@@ -50,7 +50,7 @@ To utilize GitLab4J™ API in your Java project, simply add the following de
```
java
dependencies
{
...
compile
group:
'
org
.
gitlab4j
'
,
name:
'
gitlab4j
-
api
'
,
version:
'
4.12
.
3
'
compile
group:
'
org
.
gitlab4j
'
,
name:
'
gitlab4j
-
api
'
,
version:
'
4.12
.
4
'
}
```
...
...
@@ -61,7 +61,7 @@ dependencies {
<dependency>
<groupId>
org.gitlab4j
</groupId>
<artifactId>
gitlab4j-api
</artifactId>
<version>
4.12.
3
</version>
<version>
4.12.
4
</version>
</dependency>
```
...
...
@@ -280,6 +280,7 @@ The following is a list of the available sub APIs along with a sample use of eac
[RepositoryApi](#repositoryapi)<br/>
[RepositoryFileApi](#repositoryfileapi)<br/>
[RunnersApi](#runnersapi) <br/>
[SearchApi](#searchapi)<br/>
[ServicesApi](#servicesapi)<br/>
[SessionApi](#sessionapi)<br/>
[SnippetsApi](#snippetsapi)<br/>
...
...
@@ -480,6 +481,12 @@ RepositoryFile file = gitLabApi.getRepositoryFileApi().getFile("file-path", 1234
List
<
Runner
>
runners
=
gitLabApi
.
getRunnersApi
().
getAllRunners
();
```
#### SearchApi
```
java
// Do a global search for Projects
List
<?>
projects
=
gitLabApi
.
getSearchApi
().
globalSearch
(
SearchScope
.
PROJECTS
,
"text-to-search-for"
);
```
#### ServicesApi
```
java
// Activate/Update the Slack Notifications service
...
...
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