-
-
Notifications
You must be signed in to change notification settings - Fork 223
Expand file tree
/
Copy pathcanvases.rb
More file actions
54 lines (51 loc) · 2.13 KB
/
Copy pathcanvases.rb
File metadata and controls
54 lines (51 loc) · 2.13 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# 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 [string] :channel_id
# Channel ID of the channel the canvas will be tabbed in. This is a required field for free teams.
# @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