Javadocs are available here: <ahref="http://www.messners.com/gitlab4j-api/javadocs/index.html?overview-summary.html"target="_top">Javadocs</a>
---
## Using GitLab4J
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:
```java
...
...
@@ -58,7 +59,7 @@ gitLabApi.unsudo();
```
---
## GitLab API V3 and V4 Support
As of GitLab4J-API 4.2.0 support has been added for GitLab API V4. If your application requires GitLab API V3,
you can still use GitLab4J-API by creating your GitLabApi instance as follows:
```java
...
...
@@ -67,7 +68,7 @@ GitLabApi gitLabApi = new GitLabApi(ApiVersion.V3, "http://your.gitlab.server.co
```
---
## Results Paging
GitLab4J-API provides an easy to use paging mechanism to page through lists of results from the GitLab API.
Here are a couple of examples on how to use the Pager:
```java
...
...
@@ -92,10 +93,10 @@ while (commitPager.hasNext())
allCommits.addAll(commitPager.next());
```
---
## Making API Calls
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.
Available Sub APIs
### Available Sub APIs
------------------
[CommitsApi](#commitsapi)<br/>
[DeployKeysApi](#deploykeysapi)<br/>
...
...
@@ -117,10 +118,10 @@ Available Sub APIs
[UserApi](#userapi)
Sub API Examples
### Sub API Examples
----------------
### CommitsApi
#### CommitsApi
```java
// Get a list of commits associated with the specified branch that fall within the specified time window
// This uses the ISO8601 date utilities the in org.gitlab4j.api.utils.ISO8601 class
...
...
@@ -129,13 +130,13 @@ Date until = new Date(); // now