Skip to content

Commit d4a2a25

Browse files
committed
Added SearchApi example (#425).
1 parent 8febc1e commit d4a2a25

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

README.md

+9-2
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ To utilize GitLab4J™ API in your Java project, simply add the following de
5050
```java
5151
dependencies {
5252
...
53-
compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '4.12.3'
53+
compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '4.12.4'
5454
}
5555
```
5656

@@ -61,7 +61,7 @@ dependencies {
6161
<dependency>
6262
<groupId>org.gitlab4j</groupId>
6363
<artifactId>gitlab4j-api</artifactId>
64-
<version>4.12.3</version>
64+
<version>4.12.4</version>
6565
</dependency>
6666
```
6767

@@ -280,6 +280,7 @@ The following is a list of the available sub APIs along with a sample use of eac
280280
&nbsp;&nbsp;[RepositoryApi](#repositoryapi)<br/>
281281
&nbsp;&nbsp;[RepositoryFileApi](#repositoryfileapi)<br/>
282282
&nbsp;&nbsp;[RunnersApi](#runnersapi) <br/>
283+
&nbsp;&nbsp;[SearchApi](#searchapi)<br/>
283284
&nbsp;&nbsp;[ServicesApi](#servicesapi)<br/>
284285
&nbsp;&nbsp;[SessionApi](#sessionapi)<br/>
285286
&nbsp;&nbsp;[SnippetsApi](#snippetsapi)<br/>
@@ -480,6 +481,12 @@ RepositoryFile file = gitLabApi.getRepositoryFileApi().getFile("file-path", 1234
480481
List<Runner> runners = gitLabApi.getRunnersApi().getAllRunners();
481482
```
482483

484+
#### SearchApi
485+
```java
486+
// Do a global search for Projects
487+
List<?> projects = gitLabApi.getSearchApi().globalSearch(SearchScope.PROJECTS, "text-to-search-for");
488+
```
489+
483490
#### ServicesApi
484491
```java
485492
// Activate/Update the Slack Notifications service

0 commit comments

Comments
 (0)