Module: Slack::Web::Api::Endpoints::SlackListsItems

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

Instance Method Summary collapse

Instance Method Details

#slackLists_items_create(options = {}) ⇒ Object

Add a new item to an existing List.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :list_id (Object)

    ID of the List to add the item to.

  • :duplicated_item_id (Object)

    ID of the record to make a copy of.

  • :parent_item_id (Object)

    ID of the parent record for this subtask.

  • :initial_fields (array)

    Initial item data.

Raises:

  • (ArgumentError)

See Also:



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

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

#slackLists_items_delete(options = {}) ⇒ Object

Deletes an item from an existing List.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :list_id (string)

    ID of the List containing the item.

  • :id (string)

    ID of item to delete.

Raises:

  • (ArgumentError)

See Also:



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

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

#slackLists_items_deleteMultiple(options = {}) ⇒ Object

Deletes multiple items from an existing List.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :list_id (string)

    ID of the List containing the items.

  • :ids (array)

    IDs of items to delete.

Raises:

  • (ArgumentError)

See Also:



51
52
53
54
55
# File 'lib/slack/web/api/endpoints/slackLists_items.rb', line 51

def slackLists_items_deleteMultiple(options = {})
  raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
  raise ArgumentError, 'Required arguments :ids missing' if options[:ids].nil?
  post('slackLists.items.deleteMultiple', options)
end

#slackLists_items_info(options = {}) ⇒ Object

Get a row from a List.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :list_id (string)

    ID of the List.

  • :id (string)

    ID of the row to get.

  • :include_is_subscribed (boolean)

    Set to true to include is_subscribed data for the returned List row.

Raises:

  • (ArgumentError)

See Also:



68
69
70
71
72
# File 'lib/slack/web/api/endpoints/slackLists_items.rb', line 68

def slackLists_items_info(options = {})
  raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
  raise ArgumentError, 'Required arguments :id missing' if options[:id].nil?
  post('slackLists.items.info', options)
end

#slackLists_items_list(options = {}) ⇒ Object

Get records from a List.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :list_id (string)

    ID of the List.

  • :limit (integer)

    The maximum number of records to return.

  • :cursor (string)

    Next cursor for pagination.

  • :archived (boolean)

    Boolean indicating whether archived items or normal items should be returned.

Raises:

  • (ArgumentError)

See Also:



87
88
89
90
91
92
93
94
95
96
# File 'lib/slack/web/api/endpoints/slackLists_items.rb', line 87

def slackLists_items_list(options = {})
  raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
  if block_given?
    Pagination::Cursor.new(self, :slackLists_items_list, options).each do |page|
      yield page
    end
  else
    post('slackLists.items.list', options)
  end
end

#slackLists_items_update(options = {}) ⇒ Object

Updates cells in a List.

Parameters:

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

    a customizable set of options

Options Hash (options):

  • :list_id (string)

    ID of the List to add or update cells.

  • :cells (array)

    Cells to update.

Raises:

  • (ArgumentError)

See Also:



107
108
109
110
111
# File 'lib/slack/web/api/endpoints/slackLists_items.rb', line 107

def slackLists_items_update(options = {})
  raise ArgumentError, 'Required arguments :list_id missing' if options[:list_id].nil?
  raise ArgumentError, 'Required arguments :cells missing' if options[:cells].nil?
  post('slackLists.items.update', options)
end