dblock/slack-ruby-client

View on GitHub
lib/slack/web/api/endpoints/chat_scheduledMessages.rb

Summary

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

module Slack
  module Web
    module Api
      module Endpoints
        module ChatScheduledmessages
          #
          # Returns a list of scheduled messages.
          #
          # @option options [channel] :channel
          #   The channel of the scheduled messages.
          # @option options [string] :cursor
          #   For pagination purposes, this is the cursor value returned from a previous call to chat.scheduledmessages.list indicating where you want to start this call from.
          # @option options [timestamp] :latest
          #   A Unix timestamp of the latest value in the time range.
          # @option options [integer] :limit
          #   Maximum number of original entries to return.
          # @option options [timestamp] :oldest
          #   A Unix timestamp of the oldest value in the time range.
          # @option options [string] :team_id
          #   encoded team id to list channels in, required if org token is used.
          # @see https://api.slack.com/methods/chat.scheduledMessages.list
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/chat.scheduledMessages/chat.scheduledMessages.list.json
          def chat_scheduledMessages_list(options = {})
            options = options.merge(channel: conversations_id(options)['channel']['id']) if options[:channel]
            if block_given?
              Pagination::Cursor.new(self, :chat_scheduledMessages_list, options).each do |page|
                yield page
              end
            else
              post('chat.scheduledMessages.list', options)
            end
          end
        end
      end
    end
  end
end