Elixir-Slack icon indicating copy to clipboard operation
Elixir-Slack copied to clipboard

breaking: Update latest api docs

Open inooid opened this issue 3 years ago • 1 comments

⚠️ 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_docs module 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 (foo argument 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_ids argument is deprecated and removed, team_id is added, errors changed a lot because of the user_ids being removed)
  • conversations.members.json (exclude_archived argument 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_uri arguments are made optional and single_channel argument is added)
  • oauth.v2.access.json (client_id, client_secret, code, redirect_uri arguments are made optional and grant_type, refresh_token arguments are added)
  • pins.add.json (file, file_comment arguments are removed)
  • pins.remove.json (file, file_comment arguments are removed)
  • presence.set.json (Deprecated and removed)
  • reactions.add.json (file, file_comment arguments are removed)
  • stars.list.json (user argument is removed, cursor, limit, page,, team_id arguments are added)
  • users.list.json (presence required arg is removed, cursor, include_locale, limit, team_id arguments are added)

Non breaking changes

  • bots.info.json (team_id argument is added)
  • chat.delete.json (as_user argument is added)
  • chat.postEphemeral.json (icon_emoji, icon_url, thread_ts, username arguments are added)
  • chat.postMessage.json (metadata, mrkdwn, reply_broadcast arguments are added)
  • chat.unfurl.json (source, unfurl_id, user_auth_blocks arguments are added)
  • chat.update.json (file_ids, metadata, reply_broadcast arguments are added)
  • conversations.history.json (include_all_metadata argument is added)
  • conversations.open.json (prevent_creation argument is added)
  • dnd.info.json (team_id argument is added)
  • dnd.teamInfo.json (team_id argument is added)
  • files.info.json (count, cursor, limit, page arguments are added)
  • files.list.json (count, files, page, show_files_hidden_by_limit, team_id arguments are added)
  • files.upload.json (thread_ts argument added)
  • reactions.list.json (count, cursor, limit, page,, team_id arguments are added)
  • search.all.json (count, page, team_id arguments are added)
  • search.files.json (count, page, team_id arguments are added)
  • search.messages.json (count, cursor, page, team_id arguments are added)
  • team.accessLogs.json (before, count, page,, team_id arguments are added)
  • team.info.json (domain, team arguments are added)
  • team.integrationLogs.json (count, page, team_id arguments are added)
  • usergroups.create.json (team_id argument is added)
  • usergroups.disable.json (team_id argument is added)
  • usergroups.enable.json (team_id argument is added)
  • usergroups.list.json (team_id argument is added)
  • usergroups.update.json (team_id argument is added)
  • usergroups.users.list.json (team_id argument is added)
  • usergroups.users.update.json (team_id argument is added)
  • users.conversations.json (team_id argument is added)
  • users.info.json (include_locale argument is added)

inooid avatar Aug 09 '22 14:08 inooid

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.

inooid avatar Aug 09 '22 17:08 inooid