Module: Slack::Web::Api::Endpoints::ConversationsRequestsharedinvite

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

Instance Method Summary collapse

Instance Method Details

#conversations_requestSharedInvite_approve(options = {}) ⇒ Object

Approves a request to add an external user to a channel and sends them a Slack Connect invite

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :invite_id (Object)

    ID of the requested shared channel invite to approve.

  • :is_external_limited (boolean)

    Optional boolean on whether the invited team will have post-only permissions in the channel. Will override the value on the requested invite.

  • :channel_id (string)

    Optional channel_id to which external user will be invited to. Will override the value on the requested invite.

  • :message (object)

    Object describing the text to send along with the invite. If this object is specified, both text and is_override are required properties. If is_override is set to true, text will override the original invitation message. Otherwise, text will be appended to the original invitation message. The total length of the message cannot exceed 560 characters. If is_override is set to false, the length of text and the user specified message on the invite request in total must be less than 560 characters.

Raises:

  • (ArgumentError)

See Also:



22
23
24
25
# File 'lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb', line 22

def conversations_requestSharedInvite_approve(options = {})
  raise ArgumentError, 'Required arguments :invite_id missing' if options[:invite_id].nil?
  post('conversations.requestSharedInvite.approve', options)
end

#conversations_requestSharedInvite_deny(options = {}) ⇒ Object

Denies a request to invite an external user to a channel

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :invite_id (Object)

    ID of the requested shared channel invite to deny.

  • :message (string)

    Optional message explaining why the request to invite was denied.

Raises:

  • (ArgumentError)

See Also:



36
37
38
39
# File 'lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb', line 36

def conversations_requestSharedInvite_deny(options = {})
  raise ArgumentError, 'Required arguments :invite_id missing' if options[:invite_id].nil?
  post('conversations.requestSharedInvite.deny', options)
end

#conversations_requestSharedInvite_list(options = {}) ⇒ Object

Lists requests to add external users to channels with ability to filter.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :user_id (Object)

    Optional filter to return invitation requests for the inviting user.

  • :include_expired (boolean)

    When true expired invitation requests will be returned, otherwise they will be excluded.

  • :include_approved (boolean)

    When true approved invitation requests will be returned, otherwise they will be excluded.

  • :include_denied (boolean)

    When true denied invitation requests will be returned, otherwise they will be excluded.

  • :invite_ids (array)

    An optional list of invitation ids to look up.

  • :limit (integer)

    The number of items to return. Must be between 1 - 1000 (inclusive).

  • :cursor (string)

    Paginate through collections of data by setting the cursor parameter to a next_cursor attribute returned by a previous request’s response_metadata. See pagination for more detail.

See Also:



60
61
62
63
64
65
66
67
68
# File 'lib/slack/web/api/endpoints/conversations_requestSharedInvite.rb', line 60

def conversations_requestSharedInvite_list(options = {})
  if block_given?
    Pagination::Cursor.new(self, :conversations_requestSharedInvite_list, options).each do |page|
      yield page
    end
  else
    post('conversations.requestSharedInvite.list', options)
  end
end