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
160b12e7
Commit
160b12e7
authored
May 05, 2019
by
Greg Messner
Browse files
General code clean-up (#338).
parent
79f8d9e2
Changes
2
Hide whitespace changes
Inline
Side-by-side
src/main/java/org/gitlab4j/api/ApplicationsApi.java
View file @
160b12e7
...
@@ -23,6 +23,8 @@ public class ApplicationsApi extends AbstractApi {
...
@@ -23,6 +23,8 @@ public class ApplicationsApi extends AbstractApi {
/**
/**
* Get all OATH applications.
* Get all OATH applications.
*
*
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
*
* @return a List of OAUTH Application instances
* @return a List of OAUTH Application instances
* @throws GitLabApiException if any exception occurs
* @throws GitLabApiException if any exception occurs
*/
*/
...
@@ -33,6 +35,8 @@ public class ApplicationsApi extends AbstractApi {
...
@@ -33,6 +35,8 @@ public class ApplicationsApi extends AbstractApi {
/**
/**
* Get all OAUTH applications using the specified page and per page setting
* Get all OAUTH applications using the specified page and per page setting
*
*
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
*
* @param page the page to get
* @param page the page to get
* @param perPage the number of items per page
* @param perPage the number of items per page
* @return a list of OAUTH Applications in the specified range
* @return a list of OAUTH Applications in the specified range
...
@@ -46,6 +50,8 @@ public class ApplicationsApi extends AbstractApi {
...
@@ -46,6 +50,8 @@ public class ApplicationsApi extends AbstractApi {
/**
/**
* Get a Pager of all OAUTH applications.
* Get a Pager of all OAUTH applications.
*
*
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
*
* @param itemsPerPage the number of items per page
* @param itemsPerPage the number of items per page
* @return a Pager of Application instances in the specified range
* @return a Pager of Application instances in the specified range
* @throws GitLabApiException if any exception occurs
* @throws GitLabApiException if any exception occurs
...
@@ -57,6 +63,8 @@ public class ApplicationsApi extends AbstractApi {
...
@@ -57,6 +63,8 @@ public class ApplicationsApi extends AbstractApi {
/**
/**
* Get a Stream of all OAUTH Application instances.
* Get a Stream of all OAUTH Application instances.
*
*
* <pre><code>GitLab Endpoint: GET /api/v4/applications</code></pre>
*
* @return a Stream of OAUTH Application instances
* @return a Stream of OAUTH Application instances
* @throws GitLabApiException if any exception occurs
* @throws GitLabApiException if any exception occurs
*/
*/
...
@@ -67,6 +75,8 @@ public class ApplicationsApi extends AbstractApi {
...
@@ -67,6 +75,8 @@ public class ApplicationsApi extends AbstractApi {
/**
/**
* Create an OAUTH Application.
* Create an OAUTH Application.
*
*
* <pre><code>GitLab Endpoint: POST /api/v4/applications</code></pre>
*
* @param name the name for the OAUTH Application
* @param name the name for the OAUTH Application
* @param redirectUri the redirect URI for the OAUTH Application
* @param redirectUri the redirect URI for the OAUTH Application
* @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email)
* @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email)
...
@@ -85,6 +95,8 @@ public class ApplicationsApi extends AbstractApi {
...
@@ -85,6 +95,8 @@ public class ApplicationsApi extends AbstractApi {
/**
/**
* Create an OAUTH Application.
* Create an OAUTH Application.
*
*
* <pre><code>GitLab Endpoint: POST /api/v4/applications</code></pre>
*
* @param name the name for the OAUTH Application
* @param name the name for the OAUTH Application
* @param redirectUri the redirect URI for the OAUTH Application
* @param redirectUri the redirect URI for the OAUTH Application
* @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email)
* @param scopes the scopes of the application (api, read_user, sudo, read_repository, openid, profile, email)
...
@@ -109,6 +121,8 @@ public class ApplicationsApi extends AbstractApi {
...
@@ -109,6 +121,8 @@ public class ApplicationsApi extends AbstractApi {
/**
/**
* Delete the specified OAUTH Application.
* Delete the specified OAUTH Application.
*
*
* <pre><code>GitLab Endpoint: DELETE /api/v4/applications/:applicationId</code></pre>
*
* @param applicationId the ID of the OUAUTH Application to delete
* @param applicationId the ID of the OUAUTH Application to delete
* @throws GitLabApiException if any exception occurs
* @throws GitLabApiException if any exception occurs
*/
*/
...
...
src/test/java/org/gitlab4j/api/TestApplicationsApi.java
View file @
160b12e7
...
@@ -32,7 +32,6 @@ import java.util.List;
...
@@ -32,7 +32,6 @@ import java.util.List;
import
org.gitlab4j.api.Constants.ApplicationScope
;
import
org.gitlab4j.api.Constants.ApplicationScope
;
import
org.gitlab4j.api.models.Application
;
import
org.gitlab4j.api.models.Application
;
import
org.junit.AfterClass
;
import
org.junit.Before
;
import
org.junit.Before
;
import
org.junit.BeforeClass
;
import
org.junit.BeforeClass
;
import
org.junit.Test
;
import
org.junit.Test
;
...
@@ -47,7 +46,7 @@ import org.junit.experimental.categories.Category;
...
@@ -47,7 +46,7 @@ import org.junit.experimental.categories.Category;
* If any of the above are NULL, all tests in this class will be skipped.
* If any of the above are NULL, all tests in this class will be skipped.
*/
*/
@Category
(
IntegrationTest
.
class
)
@Category
(
IntegrationTest
.
class
)
public
class
TestApplications
extends
AbstractIntegrationTest
{
public
class
TestApplications
Api
extends
AbstractIntegrationTest
{
private
static
final
String
TEST_APPLICATION_NAME
=
"Test Application for GitLab4J-API"
;
private
static
final
String
TEST_APPLICATION_NAME
=
"Test Application for GitLab4J-API"
;
private
static
final
String
TEST_APPLICATION_REDIRECT
=
"http://example.com/application"
;
private
static
final
String
TEST_APPLICATION_REDIRECT
=
"http://example.com/application"
;
...
@@ -56,7 +55,7 @@ public class TestApplications extends AbstractIntegrationTest {
...
@@ -56,7 +55,7 @@ public class TestApplications extends AbstractIntegrationTest {
private
static
GitLabApi
gitLabApi
;
private
static
GitLabApi
gitLabApi
;
public
TestApplications
()
{
public
TestApplications
Api
()
{
super
();
super
();
}
}
...
@@ -77,10 +76,6 @@ public class TestApplications extends AbstractIntegrationTest {
...
@@ -77,10 +76,6 @@ public class TestApplications extends AbstractIntegrationTest {
}
}
}
}
@AfterClass
public
static
void
teardown
()
throws
GitLabApiException
{
}
@Before
@Before
public
void
beforeMethod
()
{
public
void
beforeMethod
()
{
assumeNotNull
(
gitLabApi
);
assumeNotNull
(
gitLabApi
);
...
...
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