BlakeWilliams / Elixir-Slack

Slack real time messaging and web API client in Elixir
MIT License
674 stars 183 forks source link

Token listed as required parameters when it should #227

Closed juanazam closed 4 years ago

juanazam commented 4 years ago

Reading the docs on the package, it seems the idea is to configure the token as something global on the app, and then all calls using the library will use the token through the config.

https://github.com/BlakeWilliams/Elixir-Slack#web-api-usage

That's not the case for some of the functions the lib supports, examples:

scheduleMessage: https://github.com/BlakeWilliams/Elixir-Slack/blob/master/lib/slack/web/docs/chat.scheduleMessage.json#L5 postMessage: https://github.com/BlakeWilliams/Elixir-Slack/blob/master/lib/slack/web/docs/chat.postMessage.json

According to slack, both require a token which makes sense, but given how the library works, it should not be listed as parameter given it can be taken from the config.

Seems it makes sense to delete the token as required param and use the one in the config.