Skip to content

Commit

Permalink
adjust commentary
Browse files Browse the repository at this point in the history
  • Loading branch information
katrinSaleschus committed Nov 7, 2024
1 parent eb8c017 commit a1492ed
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ public PersonalAccessToken rotatePersonalAccessToken() throws GitLabApiException
}

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

/**
* Get information about a given access token.
* Get information about the personal access token used in the request header.
* Only working with GitLab 16.0 and above.
*
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/self</code></pre>
* <pre><code>GitLab Endpoint: GET /personal_access_tokens/self</code></pre>
*
* @return the newly created PersonalAccessToken.
* @return the specified PersonalAccessToken.
* @throws GitLabApiException if any exception occurs
*/
public PersonalAccessToken getPersonalAccessToken() throws GitLabApiException {
Expand All @@ -83,14 +83,14 @@ public PersonalAccessToken getPersonalAccessToken() throws GitLabApiException {
* Get a specific personal access token.
* Only working with GitLab 16.0 and above.
*
* <pre><code>GitLab Endpoint: POST /personal_access_tokens/:id</code></pre>
* <pre><code>GitLab Endpoint: GET /personal_access_tokens/:id</code></pre>
*
* @param id ID of the personal access token
* @return the specified PersonalAccessToken.
* @throws GitLabApiException if any exception occurs
*/
public PersonalAccessToken getPersonalAccessToken(String id) throws GitLabApiException {
Response response = get(Response.Status.OK, null, "personal_access_tokens", id);
return (response.readEntity(PersonalAccessToken.class));
return (response.readEntity(PersonalAccessToken.class));
}
}

0 comments on commit a1492ed

Please sign in to comment.