|
| 1 | +# frozen_string_literal: true |
| 2 | +# This file was auto-generated by lib/tasks/web.rake |
| 3 | + |
| 4 | +desc 'Calls methods.' |
| 5 | +command 'calls' do |g| |
| 6 | + g.desc 'Registers a new Call.' |
| 7 | + g.long_desc %( Registers a new Call. ) |
| 8 | + g.command 'add' do |c| |
| 9 | + c.flag 'external_unique_id', desc: 'An ID supplied by the 3rd-party Call provider. It must be unique across all Calls from that service.' |
| 10 | + c.flag 'join_url', desc: 'The URL required for a client to join the Call.' |
| 11 | + c.flag 'created_by', desc: 'The valid Slack user ID of the user who created this Call. When this method is called with a user token, the created_by field is optional and defaults to the authed user of the token. Otherwise, the field is required.' |
| 12 | + c.flag 'date_start', desc: 'Call start time in UTC UNIX timestamp format.' |
| 13 | + c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.' |
| 14 | + c.flag 'external_display_id', desc: 'An optional, human-readable ID supplied by the 3rd-party Call provider. If supplied, this ID will be displayed in the Call object.' |
| 15 | + c.flag 'title', desc: 'The name of the Call.' |
| 16 | + c.flag 'users', desc: 'The list of users to register as participants in the Call. Read more on how to specify users here.' |
| 17 | + c.action do |_global_options, options, _args| |
| 18 | + puts JSON.dump($client.calls_add(options)) |
| 19 | + end |
| 20 | + end |
| 21 | + |
| 22 | + g.desc 'Ends a Call.' |
| 23 | + g.long_desc %( Ends a Call. ) |
| 24 | + g.command 'end' do |c| |
| 25 | + c.flag 'id', desc: 'id returned when registering the call using the calls.add method.' |
| 26 | + c.flag 'duration', desc: 'Call duration in seconds.' |
| 27 | + c.action do |_global_options, options, _args| |
| 28 | + puts JSON.dump($client.calls_end(options)) |
| 29 | + end |
| 30 | + end |
| 31 | + |
| 32 | + g.desc 'Returns information about a Call.' |
| 33 | + g.long_desc %( Returns information about a Call. ) |
| 34 | + g.command 'info' do |c| |
| 35 | + c.flag 'id', desc: 'id of the Call returned by the calls.add method.' |
| 36 | + c.action do |_global_options, options, _args| |
| 37 | + puts JSON.dump($client.calls_info(options)) |
| 38 | + end |
| 39 | + end |
| 40 | + |
| 41 | + g.desc 'Updates information about a Call.' |
| 42 | + g.long_desc %( Updates information about a Call. ) |
| 43 | + g.command 'update' do |c| |
| 44 | + c.flag 'id', desc: 'id returned by the calls.add method.' |
| 45 | + c.flag 'desktop_app_join_url', desc: 'When supplied, available Slack clients will attempt to directly launch the 3rd-party Call with this URL.' |
| 46 | + c.flag 'join_url', desc: 'The URL required for a client to join the Call.' |
| 47 | + c.flag 'title', desc: 'The name of the Call.' |
| 48 | + c.action do |_global_options, options, _args| |
| 49 | + puts JSON.dump($client.calls_update(options)) |
| 50 | + end |
| 51 | + end |
| 52 | +end |
0 commit comments