-
-
Notifications
You must be signed in to change notification settings - Fork 15
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
Check for Deprecated on method page #55
Conversation
@dblock It’s been quite a while since I contributed to the Slack gems. I just haven’t been working on Slack bots the last few years. But I recently had to patch our company’s bot to work with |
Thanks @kstole! Want to help me maintain this repo? Then you can create some hacktoberfest labels :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think this is right. We collect deprecated methods and mark them deprecated: true
in the JSON. This skips them?
@@ -36,7 +36,9 @@ def process_list(page, _default_data = {}) | |||
|
|||
def process_method(page, default_data = {}) | |||
method_page = ensure!(page, '.apiMethodPage', default_data[:method_name]) | |||
desc = method_page.search('.apiReference__mainDescription').text.gsub("’", "'") | |||
desc = method_page.search('.apiReference__mainDescription').text.gsub('’', "'") | |||
return if desc.downcase.start_with? 'deprecated:' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't this change the value of deprecated:
below instead?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks like that used to be the behavior but was changed in #48 to hardcode 'deprecated' => false
and just remove any deprecated methods, so this is an extra check for when isDeprecated
isn't accurate
next if method['isDeprecated'] |
Consider separating the |
8e6a052
to
067960b
Compare
Yeah for sure. Happy to help maintain |
Added you, https://github.com/slack-ruby/slack-api-ref/invitations. Please continue making PRs, but feel free to merge others' and make labels as you please. |
#48 updated the spiders to grab methods from JSON data included on the Web API methods page. As noted in this comment, the deprecation info in that data can be inaccurate.
This change continues using that deprecation data but also checks for an individual method reference page labeling the method deprecated (as is the case for
rtm.start
).