Update example code for rate limiting#1076
Conversation
The API methods themselves are inconsistent about the spelling of ratelimited vs rate_limited. chat.postMessage spells it rate_limited. The API docs on rate limiting itself suggest using the HTTP status code. This updates the examples in the doc to use the status_code member of Response objects, instead of looking in the returned JSON. Closes slackapi#1073
|
I ran the doc generation script, and it proposed a large number of changes (including adding some new files to the repo). Happy to do that if you want, but figured I'd give a shot a the smaller change first. |
|
Hi @tjstum, you're so quick! Thanks for fixing the issue 👍
Thanks for being careful here. We will run the script when releasing the next version! |
seratch
left a comment
There was a problem hiding this comment.
Looks good to me. Once the builds pass, we can merge this PR.
Codecov Report
@@ Coverage Diff @@
## main #1076 +/- ##
==========================================
+ Coverage 84.15% 84.19% +0.03%
==========================================
Files 99 99
Lines 9255 9255
==========================================
+ Hits 7789 7792 +3
+ Misses 1466 1463 -3
Continue to review full report at Codecov.
|
|
@tjstum It seems that this is your first contribution. As the CLA assistant bot is taking longer than usual, I'm not sure if you've already signed our CLA but if not, would you mind signing it? Without having it, we are unable to have your contributions for this project. Please access https://cla-assistant.io/slackapi/python-slack-sdk to sign it. |
|
Yup, I signed the CLA shortly before submitting this! |
The API methods themselves are inconsistent about the spelling of
ratelimited vs rate_limited. chat.postMessage spells it
rate_limited. The API docs on rate limiting itself suggest using the
HTTP status code.
This updates the examples in the doc to use the status_code member of
Response objects, instead of looking in the returned JSON.
Closes #1073
Category
/docs-src(Documents, have you run./docs.sh?)/docs-src-v2(Documents, have you run./docs-v2.sh?)/tutorial(PythOnBoardingBot tutorial)tests/integration_tests(Automated tests for this library)Requirements
python3 -m venv .venv && source .venv/bin/activate && ./scripts/run_validation.shafter making the changes.