breaking: Update latest api docs
⚠️ This PR contains breaking changes based on deprecated methods by Slack (which presumably are already not working) and changes to which arguments are considered required and optional. The breaking changes are listed in the PR description.
Descriptions
- Adds the
slack_api_docsmodule that allows for generating API docs JSON files straight from the Slack API website (https://hexdocs.pm/slack_api_docs/readme.html) - Deleted the deprecated methods
- Updated the existing documents
For review:
I've converted all existing JSON files into the current format for an easier time reviewing. Think of it as:
Enum.map(files, fn file ->
contents = file
|> File.read!()
|> Jason.decode!()
|> Jason.encode!(pretty: true)
File.write!(file, contents)
end)
It's probably easiest to review this commit: https://github.com/BlakeWilliams/Elixir-Slack/commit/952114d2990665453fd02054bffc2e597c1ea4f2 (as it contains the pre-formatting to make it easier to review).
Breaking changes
-
api.test.json(fooargument is removed) -
channels.archive.json(Deprecated and removed) -
channels.create.json(Deprecated and removed) -
channels.history.json(Deprecated and removed) -
channels.info.json(Deprecated and removed) -
channels.invite.json(Deprecated and removed) -
channels.join.json(Deprecated and removed) -
channels.kick.json(Deprecated and removed) -
channels.leave.json(Deprecated and removed) -
channels.list.json(Deprecated and removed) -
channels.mark.json(Deprecated and removed) -
channels.rename.json(Deprecated and removed) -
channels.replies.json(Deprecated and removed) -
channels.setPurpose.json(Deprecated and removed) -
channels.setTopic.json(Deprecated and removed) -
channels.unarchive.json(Deprecated and removed) -
conversations.create.json(user_idsargument is deprecated and removed,team_idis added,errorschanged a lot because of theuser_idsbeing removed) -
conversations.members.json(exclude_archivedargument is removed) -
files.comments.add.json(Deprecated and removed) -
files.comments.edit.json(Deprecated and removed) -
groups.archive.json(Deprecated and removed) -
groups.close.json(Deprecated and removed) -
groups.create.json(Deprecated and removed) -
groups.createChild.json(Deprecated and removed) -
groups.history.json(Deprecated and removed) -
groups.info.json(Deprecated and removed) -
groups.invite.json(Deprecated and removed) -
groups.kick.json(Deprecated and removed) -
groups.leave.json(Deprecated and removed) -
groups.list.json(Deprecated and removed) -
groups.mark.json(Deprecated and removed) -
groups.open.json(Deprecated and removed) -
groups.rename.json(Deprecated and removed) -
groups.replies.json(Deprecated and removed) -
groups.setPurpose.json(Deprecated and removed) -
groups.setTopic.json(Deprecated and removed) -
groups.unarchive.json(Deprecated and removed) -
im.close.json(Deprecated and removed) -
im.history.json(Deprecated and removed) -
im.list.json(Deprecated and removed) -
im.mark.json(Deprecated and removed) -
im.open.json(Deprecated and removed) -
im.replies.json(Deprecated and removed) -
mpim.close.json(Deprecated and removed) -
mpim.history.json(Deprecated and removed) -
mpim.list.json(Deprecated and removed) -
mpim.mark.json(Deprecated and removed) -
mpim.open.json(Deprecated and removed) -
oauth.access.json(client_id,client_secret,code,redirect_uriarguments are made optional andsingle_channelargument is added) -
oauth.v2.access.json(client_id,client_secret,code,redirect_uriarguments are made optional andgrant_type,refresh_tokenarguments are added) -
pins.add.json(file,file_commentarguments are removed) -
pins.remove.json(file,file_commentarguments are removed) -
presence.set.json(Deprecated and removed) -
reactions.add.json(file,file_commentarguments are removed) -
stars.list.json(userargument is removed,cursor,limit,page,,team_idarguments are added) -
users.list.json(presencerequired arg is removed,cursor,include_locale,limit,team_idarguments are added)
Non breaking changes
-
bots.info.json(team_idargument is added) -
chat.delete.json(as_userargument is added) -
chat.postEphemeral.json(icon_emoji,icon_url,thread_ts,usernamearguments are added) -
chat.postMessage.json(metadata,mrkdwn,reply_broadcastarguments are added) -
chat.unfurl.json(source,unfurl_id,user_auth_blocksarguments are added) -
chat.update.json(file_ids,metadata,reply_broadcastarguments are added) -
conversations.history.json(include_all_metadataargument is added) -
conversations.open.json(prevent_creationargument is added) -
dnd.info.json(team_idargument is added) -
dnd.teamInfo.json(team_idargument is added) -
files.info.json(count,cursor,limit,pagearguments are added) -
files.list.json(count,files,page,show_files_hidden_by_limit,team_idarguments are added) -
files.upload.json(thread_tsargument added) -
reactions.list.json(count,cursor,limit,page,,team_idarguments are added) -
search.all.json(count,page,team_idarguments are added) -
search.files.json(count,page,team_idarguments are added) -
search.messages.json(count,cursor,page,team_idarguments are added) -
team.accessLogs.json(before,count,page,,team_idarguments are added) -
team.info.json(domain,teamarguments are added) -
team.integrationLogs.json(count,page,team_idarguments are added) -
usergroups.create.json(team_idargument is added) -
usergroups.disable.json(team_idargument is added) -
usergroups.enable.json(team_idargument is added) -
usergroups.list.json(team_idargument is added) -
usergroups.update.json(team_idargument is added) -
usergroups.users.list.json(team_idargument is added) -
usergroups.users.update.json(team_idargument is added) -
users.conversations.json(team_idargument is added) -
users.info.json(include_localeargument is added)
I suspect in order to move this PR forward, we'll probably want to release the previous changes first. Let those soak in and then see if we can update all of these. In order to move this forward after the current release cut, we'll have to have an opinion on: https://github.com/BlakeWilliams/Elixir-Slack/pull/255#discussion_r941429465.