Module: Slack::Web::Api::Endpoints::SlackListsAccess

Included in:
Slack::Web::Api::Endpoints
Defined in:
lib/slack/web/api/endpoints/slackLists_access.rb

Instance Method Summary collapse

Instance Method Details

#slackLists_access_delete(options = {}) ⇒ Object

Revoke access to a List for specified entities.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :list_id (Object)

    Encoded ID of the List.

  • :channel_ids (array)

    List of channels you wish to update access for. Can only be used if user_ids is not provided.

  • :user_ids (array)

    List of users you wish to update access for. Can only be used if channel_ids is not provided.

Raises:

  • (ArgumentError)

See Also:



20
21
22
23
# File 'lib/slack/web/api/endpoints/slackLists_access.rb', line 20

def slackLists_access_delete(options = {})
  raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
  post('slackLists.access.delete', options)
end

#slackLists_access_set(options = {}) ⇒ Object

Set the access level to a List for specified entities.

Parameters:

  • options (Hash) (defaults to: {})

    a customizable set of options

Options Hash (options):

  • :list_id (Object)

    Encoded ID of the List.

  • :access_level (Object)

    Desired level of access.

  • :channel_ids (array)

    List of channels you wish to update access for. Can only be used if user_ids is not provided.

  • :user_ids (array)

    List of users you wish to update access for. Can only be used if channel_ids is not provided.

Raises:

  • (ArgumentError)

See Also:



38
39
40
41
42
# File 'lib/slack/web/api/endpoints/slackLists_access.rb', line 38

def slackLists_access_set(options = {})
  raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
  raise ArgumentError, 'Required arguments :access_level missing' if options[:access_level].nil?
  post('slackLists.access.set', options)
end