Sha256: 6edc5c41ceeb8a62032bec6aab043623a0c0fd6eec84be10b4fd8d61aa528d70

Contents?: true

Size: 1.98 KB

Versions: 1

Compression:

Stored size: 1.98 KB

Contents

# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake

module Slack
  module Web
    module Api
      module Endpoints
        module Canvases
          #
          # Create Canvas for a user.
          #
          # @option options [Object] :document_content
          #   Structure describing the type and value of the content to create.
          # @option options [string] :title
          #   Title of the newly created canvas.
          # @see https://api.slack.com/methods/canvases.create
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.create.json
          def canvases_create(options = {})
            post('canvases.create', options)
          end

          #
          # Deletes a canvas.
          #
          # @option options [Object] :canvas_id
          #   Encoded ID of the canvas.
          # @see https://api.slack.com/methods/canvases.delete
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.delete.json
          def canvases_delete(options = {})
            raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil?
            post('canvases.delete', options)
          end

          #
          # Update an existing canvas
          #
          # @option options [Object] :canvas_id
          #   Encoded ID of the canvas.
          # @option options [array] :changes
          #   List of changes to apply on the specified canvas.
          # @see https://api.slack.com/methods/canvases.edit
          # @see https://github.com/slack-ruby/slack-api-ref/blob/master/methods/canvases/canvases.edit.json
          def canvases_edit(options = {})
            raise ArgumentError, 'Required arguments :canvas_id missing' if options[:canvas_id].nil?
            raise ArgumentError, 'Required arguments :changes missing' if options[:changes].nil?
            post('canvases.edit', options)
          end
        end
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
slack-ruby-client-2.4.0 lib/slack/web/api/endpoints/canvases.rb