Skip to content

Commit a1492ed

Browse files
adjust commentary
1 parent eb8c017 commit a1492ed

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed

Diff for: src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java

+7-7
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ public PersonalAccessToken rotatePersonalAccessToken() throws GitLabApiException
3333
}
3434

3535
/**
36-
* Rotates the given personal access token.
36+
* Rotates the personal access token used in the request header.
3737
* The token is revoked and a new one which will expire at the given expiresAt-date is created to replace it.
3838
* Only working with GitLab 16.0 and above.
3939
*
@@ -52,7 +52,7 @@ public PersonalAccessToken rotatePersonalAccessToken(Date expiresAt) throws GitL
5252
* The token is revoked and a new one which will expire at the given expiresAt-date is created to replace it.
5353
* Only working with GitLab 16.0 and above.
5454
*
55-
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id</code></pre>
55+
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id/rotate</code></pre>
5656
*
5757
* @param id ID of the personal access token
5858
* @param expiresAt Expiration date of the access token
@@ -67,12 +67,12 @@ public PersonalAccessToken rotatePersonalAccessToken(String id, Date expiresAt)
6767
}
6868

6969
/**
70-
* Get information about a given access token.
70+
* Get information about the personal access token used in the request header.
7171
* Only working with GitLab 16.0 and above.
7272
*
73-
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/self</code></pre>
73+
* <pre><code>GitLab Endpoint: GET /personal_access_tokens/self</code></pre>
7474
*
75-
* @return the newly created PersonalAccessToken.
75+
* @return the specified PersonalAccessToken.
7676
* @throws GitLabApiException if any exception occurs
7777
*/
7878
public PersonalAccessToken getPersonalAccessToken() throws GitLabApiException {
@@ -83,14 +83,14 @@ public PersonalAccessToken getPersonalAccessToken() throws GitLabApiException {
8383
* Get a specific personal access token.
8484
* Only working with GitLab 16.0 and above.
8585
*
86-
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id</code></pre>
86+
* <pre><code>GitLab Endpoint: GET /personal_access_tokens/:id</code></pre>
8787
*
8888
* @param id ID of the personal access token
8989
* @return the specified PersonalAccessToken.
9090
* @throws GitLabApiException if any exception occurs
9191
*/
9292
public PersonalAccessToken getPersonalAccessToken(String id) throws GitLabApiException {
9393
Response response = get(Response.Status.OK, null, "personal_access_tokens", id);
94-
return (response.readEntity(PersonalAccessToken.class));
94+
return (response.readEntity(PersonalAccessToken.class));
9595
}
9696
}

0 commit comments

Comments
 (0)