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

Compatibility with conversations API and deprecations on November 25th, 2020 #320

Closed
adrianomedeirossantos opened this issue Apr 26, 2020 · 8 comments

Comments

@adrianomedeirossantos
Copy link

Hi everyone,

First of all, this is a great project and it helped me to create bots in Ruby pretty quick 👍

As you guys can see in https://api.slack.com/changelog/2020-01-deprecating-antecedents-to-the-conversations-api, the Slack team has marked all Web API methods in the channels, im, groups, and mpim namespaces as deprecated. The reccomendation is to use conversations methods.

Is there any plan to make the ruby client compatible with that?

@dblock
Copy link
Collaborator

dblock commented Apr 26, 2020

Would appreciate help with these, first by updating https://github.com/slack-ruby/slack-api-ref, proper marking of any deprecated APIs in the ref's JSON, then warnings for deprecated APIs in slack-ruby-client and finally removal of those in versions after November 25th, 2020.

@dblock dblock changed the title Compatibility with conversations API Compatibility with conversations API and deprecations on November 25th, 2020 Apr 26, 2020
@adrianomedeirossantos
Copy link
Author

How can I proper mark APIs as deprecated? For example, this one https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.archive.json?

@dblock
Copy link
Collaborator

dblock commented Apr 26, 2020

How can I proper mark APIs as deprecated? For example, this one https://github.com/slack-ruby/slack-api-ref/blob/master/methods/groups/groups.archive.json?

Start by introducing a "deprecated" field into it. This file is auto-generated by a rake task by scraping Slack web pages, so assuming the method is marked as deprecated on the web page you should be able to lift it from there and add "deprecated" : true into the JSON.

@wasabigeek
Copy link
Contributor

@dblock, was trying to run rake slack:web:api:update and running into some issues with "patches":

...
- patching lib/slack/web/api/patches/chat.1.text-attachments-required.patch
- patching lib/slack/web/api/patches/chat.2.attachments-json.patch
- patching lib/slack/web/api/patches/chat.3.update-attachments-support.patch
error: patch failed: lib/slack/web/api/endpoints/chat.rb:154
error: lib/slack/web/api/endpoints/chat.rb: patch does not apply
rake aborted!
failed to apply patch
...

I'm not the most familiar with git patches, what should I do in this case?

@dblock
Copy link
Collaborator

dblock commented Jun 1, 2020

The patch will need to be updated. See https://github.com/slack-ruby/slack-ruby-client/blob/master/CONTRIBUTING.md#patching-slack-web-api to get started.

@wasabigeek
Copy link
Contributor

wasabigeek commented Jun 29, 2020

@dblock did I understand right that we can close this? At a glance it seem most of the alternative methods are already available in the client (albeit auto-generated and maybe needing fixes like #328)

@dblock
Copy link
Collaborator

dblock commented Jun 29, 2020

I think we can close when #328 is closed. Otherwise users still see deprecation methods in unexpected places.

@dblock
Copy link
Collaborator

dblock commented Jul 7, 2020

Closing via #331

@dblock dblock closed this as completed Jul 7, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants