Commit 932c6bba authored by Greg Messner's avatar Greg Messner
Browse files

Added newly implemented APIs.

parent 03f72a35
...@@ -50,7 +50,7 @@ To utilize GitLab4J™ API in your Java project, simply add the following de ...@@ -50,7 +50,7 @@ To utilize GitLab4J™ API in your Java project, simply add the following de
```java ```java
dependencies { dependencies {
... ...
compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '4.12.8' compile group: 'org.gitlab4j', name: 'gitlab4j-api', version: '4.12.9'
} }
``` ```
...@@ -61,7 +61,7 @@ dependencies { ...@@ -61,7 +61,7 @@ dependencies {
<dependency> <dependency>
<groupId>org.gitlab4j</groupId> <groupId>org.gitlab4j</groupId>
<artifactId>gitlab4j-api</artifactId> <artifactId>gitlab4j-api</artifactId>
<version>4.12.8</version> <version>4.12.9</version>
</dependency> </dependency>
``` ```
...@@ -268,6 +268,9 @@ The following is a list of the available sub APIs along with a sample use of eac ...@@ -268,6 +268,9 @@ The following is a list of the available sub APIs along with a sample use of eac
&nbsp;&nbsp;[IssuesApi](#issuesapi)<br/> &nbsp;&nbsp;[IssuesApi](#issuesapi)<br/>
&nbsp;&nbsp;[JobApi](#jobapi)<br/> &nbsp;&nbsp;[JobApi](#jobapi)<br/>
&nbsp;&nbsp;[LabelsApi](#labelsapi)<br/> &nbsp;&nbsp;[LabelsApi](#labelsapi)<br/>
&nbsp;&nbsp;[LicenseApi](#licenseapi)<br/>
&nbsp;&nbsp;[LicenseTemplatesApi](#licensetemplatesapi)<br/>
&nbsp;&nbsp;[LabelsApi](#labelsapi)<br/>
&nbsp;&nbsp;[MergeRequestApi](#mergerequestapi)<br/> &nbsp;&nbsp;[MergeRequestApi](#mergerequestapi)<br/>
&nbsp;&nbsp;[MilestonesApi](#milestonesapi)<br/> &nbsp;&nbsp;[MilestonesApi](#milestonesapi)<br/>
&nbsp;&nbsp;[NamespaceApi](#namespaceapi)<br/> &nbsp;&nbsp;[NamespaceApi](#namespaceapi)<br/>
...@@ -285,6 +288,7 @@ The following is a list of the available sub APIs along with a sample use of eac ...@@ -285,6 +288,7 @@ The following is a list of the available sub APIs along with a sample use of eac
&nbsp;&nbsp;[SessionApi](#sessionapi)<br/> &nbsp;&nbsp;[SessionApi](#sessionapi)<br/>
&nbsp;&nbsp;[SnippetsApi](#snippetsapi)<br/> &nbsp;&nbsp;[SnippetsApi](#snippetsapi)<br/>
&nbsp;&nbsp;[SystemHooksApi](#systemhooksapi)<br/> &nbsp;&nbsp;[SystemHooksApi](#systemhooksapi)<br/>
&nbsp;&nbsp;[TodosApi](#todosapi)<br/>
&nbsp;&nbsp;[UserApi](#userapi)<br/> &nbsp;&nbsp;[UserApi](#userapi)<br/>
&nbsp;&nbsp;[WikisApi](#wikisapi) &nbsp;&nbsp;[WikisApi](#wikisapi)
...@@ -397,6 +401,18 @@ List<Job> jobs = gitLabApi.getJobApi().getJobs(1234); ...@@ -397,6 +401,18 @@ List<Job> jobs = gitLabApi.getJobApi().getJobs(1234);
List<Label> labels = gitLabApi.getLabelsApi().getLabels(1234); List<Label> labels = gitLabApi.getLabelsApi().getLabels(1234);
``` ```
#### LicenseApi
```java
// Retrieve information about the current license
License license = gitLabApi.getLicenseApi().getLicense();
```
#### LicenseTemplatesApi
```java
// Get a list of open sourcse license templates
List<LicenseTemplate> licenses = gitLabApi.getLicenseTemplateApi().getLicenseTemplates();
```
#### MergeRequestApi #### MergeRequestApi
```java ```java
// Get a list of the merge requests for the specified project // Get a list of the merge requests for the specified project
...@@ -515,6 +531,12 @@ List<Snippet> snippets = gitLabApi.getSnippetsApi().getSnippets(); ...@@ -515,6 +531,12 @@ List<Snippet> snippets = gitLabApi.getSnippetsApi().getSnippets();
List<SystemHook> hooks = gitLabApi.getSystemHooksApi().getSystemHooks(); List<SystemHook> hooks = gitLabApi.getSystemHooksApi().getSystemHooks();
``` ```
#### TodosApi
```java
// Get a list of all pending todos for the current user
List<Todo> todos = gitLabApi.getTodosApi().gePendingTodos();
```
#### UserApi #### UserApi
```java ```java
// Get the User info for user_id 1 // Get the User info for user_id 1
......
...@@ -67,7 +67,8 @@ public class GitLabApi { ...@@ -67,7 +67,8 @@ public class GitLabApi {
private IssuesApi issuesApi; private IssuesApi issuesApi;
private JobApi jobApi; private JobApi jobApi;
private LabelsApi labelsApi; private LabelsApi labelsApi;
private LicensesApi licensesApi; private LicenseApi licenseApi;
private LicenseTemplatesApi licenseTemplatesApi;
private MarkdownApi markdownApi; private MarkdownApi markdownApi;
private MergeRequestApi mergeRequestApi; private MergeRequestApi mergeRequestApi;
private MilestonesApi milestonesApi; private MilestonesApi milestonesApi;
...@@ -87,9 +88,9 @@ public class GitLabApi { ...@@ -87,9 +88,9 @@ public class GitLabApi {
private SnippetsApi snippetsApi; private SnippetsApi snippetsApi;
private SystemHooksApi systemHooksApi; private SystemHooksApi systemHooksApi;
private TagsApi tagsApi; private TagsApi tagsApi;
private TodosApi todosApi;
private UserApi userApi; private UserApi userApi;
private WikisApi wikisApi; private WikisApi wikisApi;
private TodosApi todosApi;
/** /**
* Get the GitLab4J shared Logger instance. * Get the GitLab4J shared Logger instance.
...@@ -1200,24 +1201,44 @@ public class GitLabApi { ...@@ -1200,24 +1201,44 @@ public class GitLabApi {
} }
/** /**
* Gets the LicensesApi instance owned by this GitLabApi instance. The LicensesApi is used * Gets the LicenseApi instance owned by this GitLabApi instance. The LicenseApi is used
* to perform all license related API calls. * to perform all license related API calls.
* *
* @return the LicensesApi instance owned by this GitLabApi instance * @return the LicenseApi instance owned by this GitLabApi instance
*/
public LicenseApi getLicenseApi() {
if (licenseApi == null) {
synchronized (this) {
if (licenseApi == null) {
licenseApi = new LicenseApi(this);
}
}
}
return (licenseApi);
}
/**
* Gets the LicenseTemplatesApi instance owned by this GitLabApi instance. The LicenseTemplatesApi is used
* to perform all license template related API calls.
*
* @return the LicenseTemplatesApi instance owned by this GitLabApi instance
*/ */
public LicensesApi getLicensesApi() { public LicenseTemplatesApi getLicenseTemplatesApi() {
if (licensesApi == null) { if (licenseTemplatesApi == null) {
synchronized (this) { synchronized (this) {
if (licensesApi == null) { if (licenseTemplatesApi == null) {
licensesApi = new LicensesApi(this); licenseTemplatesApi = new LicenseTemplatesApi(this);
} }
} }
} }
return (licensesApi); return (licenseTemplatesApi);
} }
/** /**
* Gets the MarkdownApi instance owned by this GitLabApi instance. The MarkdownApi is used * Gets the MarkdownApi instance owned by this GitLabApi instance. The MarkdownApi is used
* to perform all markdown related API calls. * to perform all markdown related API calls.
...@@ -1559,6 +1580,41 @@ public class GitLabApi { ...@@ -1559,6 +1580,41 @@ public class GitLabApi {
return (tagsApi); return (tagsApi);
} }
/**
* Gets the SnippetsApi instance owned by this GitLabApi instance. The SnippetsApi is used
* to perform all snippet related API calls.
*
* @return the SnippetsApi instance owned by this GitLabApi instance
*/
public SnippetsApi getSnippetApi() {
if (snippetsApi == null) {
synchronized (this) {
if (snippetsApi == null) {
snippetsApi = new SnippetsApi(this);
}
}
}
return snippetsApi;
}
/**
* Gets the TodosApi instance owned by this GitLabApi instance. The TodosApi is used to perform all Todo related API calls.
*
* @return the TodosApi instance owned by this GitLabApi instance
*/
public TodosApi getTodosApi() {
if (todosApi == null) {
synchronized (this) {
if (todosApi == null) {
todosApi = new TodosApi(this);
}
}
}
return todosApi;
}
/** /**
* Gets the UserApi instance owned by this GitLabApi instance. The UserApi is used * Gets the UserApi instance owned by this GitLabApi instance. The UserApi is used
* to perform all user related API calls. * to perform all user related API calls.
...@@ -1578,6 +1634,23 @@ public class GitLabApi { ...@@ -1578,6 +1634,23 @@ public class GitLabApi {
return (userApi); return (userApi);
} }
/**
* Gets the WikisApi instance owned by this GitLabApi instance. The WikisApi is used to perform all wiki related API calls.
*
* @return the WikisApi instance owned by this GitLabApi instance
*/
public WikisApi getWikisApi() {
if (wikisApi == null) {
synchronized (this) {
if (wikisApi == null) {
wikisApi = new WikisApi(this);
}
}
}
return wikisApi;
}
/** /**
* Create and return an Optional instance associated with a GitLabApiException. * Create and return an Optional instance associated with a GitLabApiException.
* *
...@@ -1621,56 +1694,4 @@ public class GitLabApi { ...@@ -1621,56 +1694,4 @@ public class GitLabApi {
return (optional.get()); return (optional.get());
} }
/**
* Gets the SnippetsApi instance owned by this GitLabApi instance. The SnippetsApi is used
* to perform all snippet related API calls.
*
* @return the SnippetsApi instance owned by this GitLabApi instance
*/
public SnippetsApi getSnippetApi() {
if (snippetsApi == null) {
synchronized (this) {
if (snippetsApi == null) {
snippetsApi = new SnippetsApi(this);
}
}
}
return snippetsApi;
}
/**
* Gets the WikisApi instance owned by this GitLabApi instance. The WikisApi is used to perform all wiki related API calls.
*
* @return the WikisApi instance owned by this GitLabApi instance
*/
public WikisApi getWikisApi() {
if (wikisApi == null) {
synchronized (this) {
if (wikisApi == null) {
wikisApi = new WikisApi(this);
}
}
}
return wikisApi;
}
/**
* Gets the TodosApi instance owned by this GitLabApi instance. The TodosApi is used to perform all todo related API calls.
*
* @return the TodosApi instance owned by this GitLabApi instance
*/
public TodosApi getTodosApi() {
if (todosApi == null) {
synchronized (this) {
if (todosApi == null) {
todosApi = new TodosApi(this);
}
}
}
return todosApi;
}
} }
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment