-
Notifications
You must be signed in to change notification settings - Fork 13
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
7/update jul2020 #8
base: dev
Are you sure you want to change the base?
Conversation
also include require line for autoload script with example
there were a few endpoints that no longer exist, according to the docs added many new ones that were missing from the list included deprecation note for various endpoints, per slack api docs update method to match preferred method from slack api docs
@palanik went through all the Slack API docs to sync them up here. If there are any changes you need me to make just let me know. Thanks! |
@bobeagan Thanks for the PR. |
Running a local test of this, seems like there are some issues with this library using POST and working properly (could also be that I'm doing something wrong). I'll continue to investigate, probably best not to merge this until that is worked out. |
Didn't see your message above before drafting my latest comment. Thanks for the direction. |
Alright, I ran a quick test of
It appears that the Content-Type needs to be explicitly passed when using POST with JSON-encoded bodies. Additionally. the token should be included as a bearer token in the Authorization header. (https://api.slack.com/web#json-encoded_bodies) We cannot, however, simply treat all POST as json encoded due to Maybe allowing to replace the $opts would let me create multiple clients that served different purposes or having helper functions that constructed them appropriately? Let me know your thoughts or if I'm missing something. |
The right fix to me seems to be to allow endpoints themselves to define their Guzzle options/headers but that would require an update to wrapi-php. The shortcut workaround seems like allowing the constructor to accept an optional options array after the token which when provided would replace the default one. Then people would just need to create different client instances based on what endpoints they were using it for. This still would result in a breaking change since the formatting of the payload sent in the request changes (array vs json encoded string) due to the update to the method on several of the endpoints. Let me know if you are interested in moving forward with some change to fix this or not. Thanks. |
This fixes #5, fixes #7
Change Summary