You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+23-22Lines changed: 23 additions & 22 deletions
Original file line number
Diff line number
Diff line change
@@ -27,6 +27,7 @@ dependencies {
27
27
Javadocs are available here: <ahref="http://www.messners.com/gitlab4j-api/javadocs/index.html?overview-summary.html"target="_top">Javadocs</a>
28
28
29
29
---
30
+
## Using GitLab4J
30
31
31
32
GitLab4J-API is quite simple to use, all you need is the URL to your GitLab server and the Private Token from your GitLab Account Settings page. Once you have that info it is as simple as:
32
33
```java
@@ -58,7 +59,7 @@ gitLabApi.unsudo();
58
59
```
59
60
60
61
---
61
-
62
+
## GitLab API V3 and V4 Support
62
63
As of GitLab4J-API 4.2.0 support has been added for GitLab API V4. If your application requires GitLab API V3,
63
64
you can still use GitLab4J-API by creating your GitLabApi instance as follows:
64
65
```java
@@ -67,7 +68,7 @@ GitLabApi gitLabApi = new GitLabApi(ApiVersion.V3, "http://your.gitlab.server.co
67
68
```
68
69
69
70
---
70
-
71
+
## Results Paging
71
72
GitLab4J-API provides an easy to use paging mechanism to page through lists of results from the GitLab API.
72
73
Here are a couple of examples on how to use the Pager:
73
74
```java
@@ -92,10 +93,10 @@ while (commitPager.hasNext())
92
93
allCommits.addAll(commitPager.next());
93
94
```
94
95
---
95
-
96
+
## Making API Calls
96
97
The API has been broken up into sub APIs classes to make it easier to learn and to separate concerns. Following is a list of the sub APIs along with a sample use of each API. See the <ahref="http://www.messners.com/gitlab4j-api/javadocs/index.html?org/gitlab4j/api/package-summary.html"target="_top">Javadocs</a> for a complete list of available methods for each sub API.
97
98
98
-
Available Sub APIs
99
+
### Available Sub APIs
99
100
------------------
100
101
[CommitsApi](#commitsapi)<br/>
101
102
[DeployKeysApi](#deploykeysapi)<br/>
@@ -117,10 +118,10 @@ Available Sub APIs
117
118
[UserApi](#userapi)
118
119
119
120
120
-
Sub API Examples
121
+
### Sub API Examples
121
122
----------------
122
123
123
-
### CommitsApi
124
+
####CommitsApi
124
125
```java
125
126
// Get a list of commits associated with the specified branch that fall within the specified time window
126
127
// This uses the ISO8601 date utilities the in org.gitlab4j.api.utils.ISO8601 class
@@ -129,39 +130,39 @@ Date until = new Date(); // now
0 commit comments