From a805076336322a0d25f66974aa25227b0654c666 Mon Sep 17 00:00:00 2001 From: Jeremie Bresson Date: Thu, 28 Nov 2024 16:51:36 +0100 Subject: [PATCH] Delete GroupApi#uploadFile(..) method --- src/main/java/org/gitlab4j/api/GroupApi.java | 64 -------------------- 1 file changed, 64 deletions(-) diff --git a/src/main/java/org/gitlab4j/api/GroupApi.java b/src/main/java/org/gitlab4j/api/GroupApi.java index a8c6d0ee8..008d1081f 100644 --- a/src/main/java/org/gitlab4j/api/GroupApi.java +++ b/src/main/java/org/gitlab4j/api/GroupApi.java @@ -2454,68 +2454,4 @@ public List getUploadFiles(Object groupIdOrPath) throws GitLabApiE Response response = get(Response.Status.OK, null, "groups", getGroupIdOrPath(groupIdOrPath), "uploads"); return (response.readEntity(new GenericType>() {})); } - - /** - * Uploads a file to the specified group to be used in an issue or merge request description, or a comment. - * - *
GitLab Endpoint: POST /groups/:id/uploads
- * - * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance, required - * @param fileToUpload the File instance of the file to upload, required - * @return a FileUpload instance with information on the just uploaded file - * @throws GitLabApiException if any exception occurs - */ - public FileUpload uploadFile(Object groupIdOrPath, File fileToUpload) throws GitLabApiException { - return (uploadFile(groupIdOrPath, fileToUpload, null)); - } - - /** - * Uploads a file to the specified group to be used in an issue or merge request description, or a comment. - * - *
GitLab Endpoint: POST /groups/:id/uploads
- * - * @param groupIdOrPath the group in the form of an Long(ID), String(path), or Group instance, required - * @param fileToUpload the File instance of the file to upload, required - * @param mediaType unused; will be removed in the next major version - * @return a FileUpload instance with information on the just uploaded file - * @throws GitLabApiException if any exception occurs - */ - public FileUpload uploadFile(Object groupIdOrPath, File fileToUpload, String mediaType) throws GitLabApiException { - Response response = upload( - Response.Status.CREATED, - "file", - fileToUpload, - mediaType, - "groups", - getGroupIdOrPath(groupIdOrPath), - "uploads"); - return (response.readEntity(FileUpload.class)); - } - - /** - * Uploads some data in an {@link InputStream} to the specified group, - * to be used in an issue or merge request description, or a comment. - * - *
GitLab Endpoint: POST /groups/:id/uploads
- * - * @param groupIdOrPath the group in the form of an Integer(ID), String(path), or Group instance, required - * @param inputStream the data to upload, required - * @param filename The filename of the file to upload - * @param mediaType unused; will be removed in the next major version - * @return a FileUpload instance with information on the just uploaded file - * @throws GitLabApiException if any exception occurs - */ - public FileUpload uploadFile(Object groupIdOrPath, InputStream inputStream, String filename, String mediaType) - throws GitLabApiException { - Response response = upload( - Response.Status.CREATED, - "file", - inputStream, - filename, - mediaType, - "groups", - getGroupIdOrPath(groupIdOrPath), - "uploads"); - return (response.readEntity(FileUpload.class)); - } }