dblock/slack-ruby-client

View on GitHub
bin/commands/admin_workflows_collaborators.rb

Summary

Maintainability
A
2 hrs
Test Coverage
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Cli
    class App
      desc 'AdminWorkflowsCollaborators methods.'
      command 'admin_workflows_collaborators' do |g|
        g.desc 'Add collaborators to workflows within the team or enterprise'
        g.long_desc %( Add collaborators to workflows within the team or enterprise )
        g.command 'add' do |c|
          c.flag 'collaborator_ids', desc: 'Array of collaborators (encoded user IDs) to add; max 50.'
          c.flag 'workflow_ids', desc: 'Array of workflow IDs to edit; max 50.'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.admin_workflows_collaborators_add(options))
          end
        end

        g.desc 'Remove collaborators from workflows within the team or enterprise'
        g.long_desc %( Remove collaborators from workflows within the team or enterprise )
        g.command 'remove' do |c|
          c.flag 'collaborator_ids', desc: 'Array of collaborators (encoded user IDs) to remove; max 50.'
          c.flag 'workflow_ids', desc: 'Array of workflow IDs to edit; max 50.'
          c.action do |_global_options, options, _args|
            puts JSON.dump(@client.admin_workflows_collaborators_remove(options))
          end
        end
      end
    end
  end
end