Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mark files.upload / rtm.connect as deprecated #1298

Merged
merged 1 commit into from
Apr 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -1070,8 +1070,10 @@ CompletableFuture<AdminConversationsWhitelistListGroupsLinkedToChannelResponse>

CompletableFuture<FilesSharedPublicURLResponse> filesSharedPublicURL(RequestConfigurator<FilesSharedPublicURLRequest.FilesSharedPublicURLRequestBuilder> req);

@Deprecated // https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay
CompletableFuture<FilesUploadResponse> filesUpload(FilesUploadRequest req);

@Deprecated // https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay
CompletableFuture<FilesUploadResponse> filesUpload(RequestConfigurator<FilesUploadRequest.FilesUploadRequestBuilder> req);

CompletableFuture<FilesGetUploadURLExternalResponse> filesGetUploadURLExternal(FilesGetUploadURLExternalRequest req);
Expand Down Expand Up @@ -1230,8 +1232,10 @@ CompletableFuture<AdminConversationsWhitelistListGroupsLinkedToChannelResponse>
// rtm
// ------------------------------

@Deprecated // https://api.slack.com/changelog/2024-04-discontinuing-new-creation-of-classic-slack-apps-and-custom-bots
CompletableFuture<RTMConnectResponse> rtmConnect(RTMConnectRequest req);

@Deprecated // https://api.slack.com/changelog/2024-04-discontinuing-new-creation-of-classic-slack-apps-and-custom-bots
CompletableFuture<RTMConnectResponse> rtmConnect(RequestConfigurator<RTMConnectRequest.RTMConnectRequestBuilder> req);

@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -447,6 +447,7 @@ private Methods() {
public static final String FILES_LIST = "files.list";
public static final String FILES_REVOKE_PUBLIC_URL = "files.revokePublicURL";
public static final String FILES_SHARED_PUBLIC_URL = "files.sharedPublicURL";
@Deprecated // https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay
public static final String FILES_UPLOAD = "files.upload";

public static final String FILES_GET_UPLOAD_URL_EXTERNAL = "files.getUploadURLExternal";
Expand Down Expand Up @@ -598,6 +599,7 @@ private Methods() {
// rtm
// ------------------------------

@Deprecated // https://api.slack.com/changelog/2024-04-discontinuing-new-creation-of-classic-slack-apps-and-custom-bots
public static final String RTM_CONNECT = "rtm.connect";
@Deprecated // https://api.slack.com/changelog/2021-10-rtm-start-to-stop
public static final String RTM_START = "rtm.start";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1356,8 +1356,10 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels(

FilesSharedPublicURLResponse filesSharedPublicURL(RequestConfigurator<FilesSharedPublicURLRequest.FilesSharedPublicURLRequestBuilder> req) throws IOException, SlackApiException;

@Deprecated // https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay
FilesUploadResponse filesUpload(FilesUploadRequest req) throws IOException, SlackApiException;

@Deprecated // https://api.slack.com/changelog/2024-04-a-better-way-to-upload-files-is-here-to-stay
FilesUploadResponse filesUpload(RequestConfigurator<FilesUploadRequest.FilesUploadRequestBuilder> req) throws IOException, SlackApiException;

FilesGetUploadURLExternalResponse filesGetUploadURLExternal(FilesGetUploadURLExternalRequest req) throws IOException, SlackApiException;
Expand Down Expand Up @@ -1772,8 +1774,10 @@ AdminUsergroupsRemoveChannelsResponse adminUsergroupsRemoveChannels(
// rtm
// ------------------------------

@Deprecated // https://api.slack.com/changelog/2024-04-discontinuing-new-creation-of-classic-slack-apps-and-custom-bots
RTMConnectResponse rtmConnect(RTMConnectRequest req) throws IOException, SlackApiException;

@Deprecated // https://api.slack.com/changelog/2024-04-discontinuing-new-creation-of-classic-slack-apps-and-custom-bots
RTMConnectResponse rtmConnect(RequestConfigurator<RTMConnectRequest.RTMConnectRequestBuilder> req) throws IOException, SlackApiException;

@Deprecated
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1923,11 +1923,13 @@ public CompletableFuture<FilesSharedPublicURLResponse> filesSharedPublicURL(Requ
}

@Override
@Deprecated
public CompletableFuture<FilesUploadResponse> filesUpload(FilesUploadRequest req) {
return executor.execute(FILES_UPLOAD, toMap(req), () -> methods.filesUpload(req));
}

@Override
@Deprecated
public CompletableFuture<FilesUploadResponse> filesUpload(RequestConfigurator<FilesUploadRequest.FilesUploadRequestBuilder> req) {
return filesUpload(req.configure(FilesUploadRequest.builder()).build());
}
Expand Down Expand Up @@ -2237,11 +2239,13 @@ public CompletableFuture<RemindersListResponse> remindersList(RequestConfigurato
}

@Override
@Deprecated
public CompletableFuture<RTMConnectResponse> rtmConnect(RTMConnectRequest req) {
return executor.execute(RTM_CONNECT, toMap(req), () -> methods.rtmConnect(req));
}

@Override
@Deprecated
public CompletableFuture<RTMConnectResponse> rtmConnect(RequestConfigurator<RTMConnectRequest.RTMConnectRequestBuilder> req) {
return rtmConnect(req.configure(RTMConnectRequest.builder()).build());
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2906,11 +2906,13 @@ public RemindersListResponse remindersList(RequestConfigurator<RemindersListRequ
}

@Override
@Deprecated
public RTMConnectResponse rtmConnect(RTMConnectRequest req) throws IOException, SlackApiException {
return postFormWithTokenAndParseResponse(toForm(req), Methods.RTM_CONNECT, getToken(req), RTMConnectResponse.class);
}

@Override
@Deprecated
public RTMConnectResponse rtmConnect(RequestConfigurator<RTMConnectRequest.RTMConnectRequestBuilder> req) throws IOException, SlackApiException {
return rtmConnect(req.configure(RTMConnectRequest.builder()).build());
}
Expand Down
Loading