forked from slack-ruby/slack-ruby-client
-
Notifications
You must be signed in to change notification settings - Fork 0
/
apps_manifest.rb
58 lines (53 loc) · 2.63 KB
/
apps_manifest.rb
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
55
56
57
58
# frozen_string_literal: true
# This file was auto-generated by lib/tasks/web.rake
module Slack
module Cli
class App
desc 'AppsManifest methods.'
command 'apps_manifest' do |g|
g.desc 'Create an app from an app manifest.'
g.long_desc %( Create an app from an app manifest. )
g.command 'create' do |c|
c.flag 'manifest', desc: 'A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_manifest_create(options))
end
end
g.desc 'Permanently deletes an app created through app manifests'
g.long_desc %( Permanently deletes an app created through app manifests )
g.command 'delete' do |c|
c.flag 'app_id', desc: 'The ID of the app you want to delete.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_manifest_delete(options))
end
end
g.desc 'Export an app manifest from an existing app'
g.long_desc %( Export an app manifest from an existing app )
g.command 'export' do |c|
c.flag 'app_id', desc: 'The ID of the app whose configuration you want to export as a manifest.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_manifest_export(options))
end
end
g.desc 'Update an app from an app manifest'
g.long_desc %( Update an app from an app manifest )
g.command 'update' do |c|
c.flag 'app_id', desc: 'The ID of the app whose configuration you want to update.'
c.flag 'manifest', desc: 'A JSON app manifest encoded as a string. This manifest must use a valid app manifest schema - read our guide to creating one. As this method entirely replaces any previous configuration, manifest must contain both unmodified and modified fields.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_manifest_update(options))
end
end
g.desc 'Validate an app manifest'
g.long_desc %( Validate an app manifest )
g.command 'validate' do |c|
c.flag 'manifest', desc: 'The manifest to be validated. Will be validated against the app manifest schema - read our guide.'
c.flag 'app_id', desc: 'The ID of the app whose configuration you want to validate.'
c.action do |_global_options, options, _args|
puts JSON.dump(@client.apps_manifest_validate(options))
end
end
end
end
end
end