From a1492ed60e4a74996594e32cb38cfa6b43e2c39e Mon Sep 17 00:00:00 2001 From: ksaleschus Date: Thu, 7 Nov 2024 08:36:13 +0100 Subject: [PATCH] adjust commentary --- .../org/gitlab4j/api/PersonalAccessTokenApi.java | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java b/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java index b0fa8a4e..2b77cc40 100644 --- a/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java +++ b/src/main/java/org/gitlab4j/api/PersonalAccessTokenApi.java @@ -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. * @@ -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. * - *
GitLab Endpoint: POST /personal_access_tokens/:id
+ *
GitLab Endpoint: POST /personal_access_tokens/:id/rotate
* * @param id ID of the personal access token * @param expiresAt Expiration date of the access token @@ -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. * - *
GitLab Endpoint: POST /personal_access_tokens/self
+ *
GitLab Endpoint: GET /personal_access_tokens/self
* - * @return the newly created PersonalAccessToken. + * @return the specified PersonalAccessToken. * @throws GitLabApiException if any exception occurs */ public PersonalAccessToken getPersonalAccessToken() throws GitLabApiException { @@ -83,7 +83,7 @@ public PersonalAccessToken getPersonalAccessToken() throws GitLabApiException { * Get a specific personal access token. * Only working with GitLab 16.0 and above. * - *
GitLab Endpoint: POST /personal_access_tokens/:id
+ *
GitLab Endpoint: GET /personal_access_tokens/:id
* * @param id ID of the personal access token * @return the specified PersonalAccessToken. @@ -91,6 +91,6 @@ public PersonalAccessToken getPersonalAccessToken() throws GitLabApiException { */ 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)); } }