daytona_toolbox_api_client 0.0.0.pre.dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +7 -0
- data/.gitignore +39 -0
- data/.openapi-generator/FILES +92 -0
- data/.openapi-generator/VERSION +1 -0
- data/.openapi-generator-ignore +12 -0
- data/.rspec +2 -0
- data/.rubocop.yml +148 -0
- data/Gemfile +9 -0
- data/Gemfile.lock +101 -0
- data/Rakefile +10 -0
- data/daytona_toolbox_api_client.gemspec +39 -0
- data/fix-gemspec.sh +13 -0
- data/lib/daytona_toolbox_api_client/api/computer_use_api.rb +1463 -0
- data/lib/daytona_toolbox_api_client/api/file_system_api.rb +893 -0
- data/lib/daytona_toolbox_api_client/api/git_api.rb +744 -0
- data/lib/daytona_toolbox_api_client/api/info_api.rb +193 -0
- data/lib/daytona_toolbox_api_client/api/interpreter_api.rb +267 -0
- data/lib/daytona_toolbox_api_client/api/lsp_api.rb +510 -0
- data/lib/daytona_toolbox_api_client/api/port_api.rb +142 -0
- data/lib/daytona_toolbox_api_client/api/process_api.rb +938 -0
- data/lib/daytona_toolbox_api_client/api_client.rb +392 -0
- data/lib/daytona_toolbox_api_client/api_error.rb +58 -0
- data/lib/daytona_toolbox_api_client/configuration.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/command.rb +270 -0
- data/lib/daytona_toolbox_api_client/models/completion_context.rb +244 -0
- data/lib/daytona_toolbox_api_client/models/completion_item.rb +289 -0
- data/lib/daytona_toolbox_api_client/models/completion_list.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_start_response.rb +229 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_status_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/computer_use_stop_response.rb +229 -0
- data/lib/daytona_toolbox_api_client/models/create_context_request.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/create_session_request.rb +235 -0
- data/lib/daytona_toolbox_api_client/models/display_info.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/display_info_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/execute_request.rb +255 -0
- data/lib/daytona_toolbox_api_client/models/execute_response.rb +244 -0
- data/lib/daytona_toolbox_api_client/models/file_info.rb +417 -0
- data/lib/daytona_toolbox_api_client/models/file_status.rb +335 -0
- data/lib/daytona_toolbox_api_client/models/files_download_request.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/git_add_request.rb +264 -0
- data/lib/daytona_toolbox_api_client/models/git_branch_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_checkout_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_clone_request.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_info.rb +339 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_request.rb +322 -0
- data/lib/daytona_toolbox_api_client/models/git_commit_response.rb +235 -0
- data/lib/daytona_toolbox_api_client/models/git_git_delete_branch_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/git_repo_request.rb +253 -0
- data/lib/daytona_toolbox_api_client/models/git_status.rb +290 -0
- data/lib/daytona_toolbox_api_client/models/interpreter_context.rb +339 -0
- data/lib/daytona_toolbox_api_client/models/is_port_in_use_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_hotkey_request.rb +219 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_press_request.rb +230 -0
- data/lib/daytona_toolbox_api_client/models/keyboard_type_request.rb +228 -0
- data/lib/daytona_toolbox_api_client/models/list_branch_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/list_contexts_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/lsp_completion_params.rb +322 -0
- data/lib/daytona_toolbox_api_client/models/lsp_document_request.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/lsp_location.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_position.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_range.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_server_request.rb +261 -0
- data/lib/daytona_toolbox_api_client/models/lsp_symbol.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/match.rb +287 -0
- data/lib/daytona_toolbox_api_client/models/mouse_click_request.rb +246 -0
- data/lib/daytona_toolbox_api_client/models/mouse_click_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_drag_request.rb +254 -0
- data/lib/daytona_toolbox_api_client/models/mouse_drag_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_move_request.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_position_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/mouse_scroll_request.rb +246 -0
- data/lib/daytona_toolbox_api_client/models/port_list.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/position.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_errors_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_logs_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_restart_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/process_status.rb +245 -0
- data/lib/daytona_toolbox_api_client/models/process_status_response.rb +227 -0
- data/lib/daytona_toolbox_api_client/models/pty_create_request.rb +266 -0
- data/lib/daytona_toolbox_api_client/models/pty_create_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/pty_list_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/pty_resize_request.rb +297 -0
- data/lib/daytona_toolbox_api_client/models/pty_session_info.rb +284 -0
- data/lib/daytona_toolbox_api_client/models/replace_request.rb +289 -0
- data/lib/daytona_toolbox_api_client/models/replace_result.rb +236 -0
- data/lib/daytona_toolbox_api_client/models/screenshot_response.rb +236 -0
- data/lib/daytona_toolbox_api_client/models/scroll_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/search_files_response.rb +237 -0
- data/lib/daytona_toolbox_api_client/models/session.rb +263 -0
- data/lib/daytona_toolbox_api_client/models/session_execute_request.rb +253 -0
- data/lib/daytona_toolbox_api_client/models/session_execute_response.rb +254 -0
- data/lib/daytona_toolbox_api_client/models/status.rb +46 -0
- data/lib/daytona_toolbox_api_client/models/user_home_dir_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/models/window_info.rb +272 -0
- data/lib/daytona_toolbox_api_client/models/windows_response.rb +220 -0
- data/lib/daytona_toolbox_api_client/models/work_dir_response.rb +218 -0
- data/lib/daytona_toolbox_api_client/version.rb +15 -0
- data/lib/daytona_toolbox_api_client.rb +120 -0
- data/project.json +65 -0
- metadata +178 -0
|
@@ -0,0 +1,1463 @@
|
|
|
1
|
+
=begin
|
|
2
|
+
#Daytona Daemon API
|
|
3
|
+
|
|
4
|
+
#Daytona Daemon API
|
|
5
|
+
|
|
6
|
+
The version of the OpenAPI document: v0.0.0-dev
|
|
7
|
+
|
|
8
|
+
Generated by: https://openapi-generator.tech
|
|
9
|
+
Generator version: 7.12.0
|
|
10
|
+
|
|
11
|
+
=end
|
|
12
|
+
|
|
13
|
+
require 'cgi'
|
|
14
|
+
|
|
15
|
+
module DaytonaToolboxApiClient
|
|
16
|
+
class ComputerUseApi
|
|
17
|
+
attr_accessor :api_client
|
|
18
|
+
|
|
19
|
+
def initialize(api_client = ApiClient.default)
|
|
20
|
+
@api_client = api_client
|
|
21
|
+
end
|
|
22
|
+
# Click mouse button
|
|
23
|
+
# Click the mouse button at the specified coordinates
|
|
24
|
+
# @param request [MouseClickRequest] Mouse click request
|
|
25
|
+
# @param [Hash] opts the optional parameters
|
|
26
|
+
# @return [MouseClickResponse]
|
|
27
|
+
def click(request, opts = {})
|
|
28
|
+
data, _status_code, _headers = click_with_http_info(request, opts)
|
|
29
|
+
data
|
|
30
|
+
end
|
|
31
|
+
|
|
32
|
+
# Click mouse button
|
|
33
|
+
# Click the mouse button at the specified coordinates
|
|
34
|
+
# @param request [MouseClickRequest] Mouse click request
|
|
35
|
+
# @param [Hash] opts the optional parameters
|
|
36
|
+
# @return [Array<(MouseClickResponse, Integer, Hash)>] MouseClickResponse data, response status code and response headers
|
|
37
|
+
def click_with_http_info(request, opts = {})
|
|
38
|
+
if @api_client.config.debugging
|
|
39
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.click ...'
|
|
40
|
+
end
|
|
41
|
+
# verify the required parameter 'request' is set
|
|
42
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
43
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ComputerUseApi.click"
|
|
44
|
+
end
|
|
45
|
+
# resource path
|
|
46
|
+
local_var_path = '/computeruse/mouse/click'
|
|
47
|
+
|
|
48
|
+
# query parameters
|
|
49
|
+
query_params = opts[:query_params] || {}
|
|
50
|
+
|
|
51
|
+
# header parameters
|
|
52
|
+
header_params = opts[:header_params] || {}
|
|
53
|
+
# HTTP header 'Accept' (if needed)
|
|
54
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
55
|
+
# HTTP header 'Content-Type'
|
|
56
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
57
|
+
if !content_type.nil?
|
|
58
|
+
header_params['Content-Type'] = content_type
|
|
59
|
+
end
|
|
60
|
+
|
|
61
|
+
# form parameters
|
|
62
|
+
form_params = opts[:form_params] || {}
|
|
63
|
+
|
|
64
|
+
# http body (model)
|
|
65
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
66
|
+
|
|
67
|
+
# return_type
|
|
68
|
+
return_type = opts[:debug_return_type] || 'MouseClickResponse'
|
|
69
|
+
|
|
70
|
+
# auth_names
|
|
71
|
+
auth_names = opts[:debug_auth_names] || []
|
|
72
|
+
|
|
73
|
+
new_options = opts.merge(
|
|
74
|
+
:operation => :"ComputerUseApi.click",
|
|
75
|
+
:header_params => header_params,
|
|
76
|
+
:query_params => query_params,
|
|
77
|
+
:form_params => form_params,
|
|
78
|
+
:body => post_body,
|
|
79
|
+
:auth_names => auth_names,
|
|
80
|
+
:return_type => return_type
|
|
81
|
+
)
|
|
82
|
+
|
|
83
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
84
|
+
if @api_client.config.debugging
|
|
85
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#click\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
86
|
+
end
|
|
87
|
+
return data, status_code, headers
|
|
88
|
+
end
|
|
89
|
+
|
|
90
|
+
# Drag mouse
|
|
91
|
+
# Drag the mouse from start to end coordinates
|
|
92
|
+
# @param request [MouseDragRequest] Mouse drag request
|
|
93
|
+
# @param [Hash] opts the optional parameters
|
|
94
|
+
# @return [MouseDragResponse]
|
|
95
|
+
def drag(request, opts = {})
|
|
96
|
+
data, _status_code, _headers = drag_with_http_info(request, opts)
|
|
97
|
+
data
|
|
98
|
+
end
|
|
99
|
+
|
|
100
|
+
# Drag mouse
|
|
101
|
+
# Drag the mouse from start to end coordinates
|
|
102
|
+
# @param request [MouseDragRequest] Mouse drag request
|
|
103
|
+
# @param [Hash] opts the optional parameters
|
|
104
|
+
# @return [Array<(MouseDragResponse, Integer, Hash)>] MouseDragResponse data, response status code and response headers
|
|
105
|
+
def drag_with_http_info(request, opts = {})
|
|
106
|
+
if @api_client.config.debugging
|
|
107
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.drag ...'
|
|
108
|
+
end
|
|
109
|
+
# verify the required parameter 'request' is set
|
|
110
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
111
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ComputerUseApi.drag"
|
|
112
|
+
end
|
|
113
|
+
# resource path
|
|
114
|
+
local_var_path = '/computeruse/mouse/drag'
|
|
115
|
+
|
|
116
|
+
# query parameters
|
|
117
|
+
query_params = opts[:query_params] || {}
|
|
118
|
+
|
|
119
|
+
# header parameters
|
|
120
|
+
header_params = opts[:header_params] || {}
|
|
121
|
+
# HTTP header 'Accept' (if needed)
|
|
122
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
123
|
+
# HTTP header 'Content-Type'
|
|
124
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
125
|
+
if !content_type.nil?
|
|
126
|
+
header_params['Content-Type'] = content_type
|
|
127
|
+
end
|
|
128
|
+
|
|
129
|
+
# form parameters
|
|
130
|
+
form_params = opts[:form_params] || {}
|
|
131
|
+
|
|
132
|
+
# http body (model)
|
|
133
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
134
|
+
|
|
135
|
+
# return_type
|
|
136
|
+
return_type = opts[:debug_return_type] || 'MouseDragResponse'
|
|
137
|
+
|
|
138
|
+
# auth_names
|
|
139
|
+
auth_names = opts[:debug_auth_names] || []
|
|
140
|
+
|
|
141
|
+
new_options = opts.merge(
|
|
142
|
+
:operation => :"ComputerUseApi.drag",
|
|
143
|
+
:header_params => header_params,
|
|
144
|
+
:query_params => query_params,
|
|
145
|
+
:form_params => form_params,
|
|
146
|
+
:body => post_body,
|
|
147
|
+
:auth_names => auth_names,
|
|
148
|
+
:return_type => return_type
|
|
149
|
+
)
|
|
150
|
+
|
|
151
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
152
|
+
if @api_client.config.debugging
|
|
153
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#drag\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
154
|
+
end
|
|
155
|
+
return data, status_code, headers
|
|
156
|
+
end
|
|
157
|
+
|
|
158
|
+
# Get computer use process status
|
|
159
|
+
# Get the status of all computer use processes
|
|
160
|
+
# @param [Hash] opts the optional parameters
|
|
161
|
+
# @return [ComputerUseStatusResponse]
|
|
162
|
+
def get_computer_use_status(opts = {})
|
|
163
|
+
data, _status_code, _headers = get_computer_use_status_with_http_info(opts)
|
|
164
|
+
data
|
|
165
|
+
end
|
|
166
|
+
|
|
167
|
+
# Get computer use process status
|
|
168
|
+
# Get the status of all computer use processes
|
|
169
|
+
# @param [Hash] opts the optional parameters
|
|
170
|
+
# @return [Array<(ComputerUseStatusResponse, Integer, Hash)>] ComputerUseStatusResponse data, response status code and response headers
|
|
171
|
+
def get_computer_use_status_with_http_info(opts = {})
|
|
172
|
+
if @api_client.config.debugging
|
|
173
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.get_computer_use_status ...'
|
|
174
|
+
end
|
|
175
|
+
# resource path
|
|
176
|
+
local_var_path = '/computeruse/process-status'
|
|
177
|
+
|
|
178
|
+
# query parameters
|
|
179
|
+
query_params = opts[:query_params] || {}
|
|
180
|
+
|
|
181
|
+
# header parameters
|
|
182
|
+
header_params = opts[:header_params] || {}
|
|
183
|
+
# HTTP header 'Accept' (if needed)
|
|
184
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
185
|
+
|
|
186
|
+
# form parameters
|
|
187
|
+
form_params = opts[:form_params] || {}
|
|
188
|
+
|
|
189
|
+
# http body (model)
|
|
190
|
+
post_body = opts[:debug_body]
|
|
191
|
+
|
|
192
|
+
# return_type
|
|
193
|
+
return_type = opts[:debug_return_type] || 'ComputerUseStatusResponse'
|
|
194
|
+
|
|
195
|
+
# auth_names
|
|
196
|
+
auth_names = opts[:debug_auth_names] || []
|
|
197
|
+
|
|
198
|
+
new_options = opts.merge(
|
|
199
|
+
:operation => :"ComputerUseApi.get_computer_use_status",
|
|
200
|
+
:header_params => header_params,
|
|
201
|
+
:query_params => query_params,
|
|
202
|
+
:form_params => form_params,
|
|
203
|
+
:body => post_body,
|
|
204
|
+
:auth_names => auth_names,
|
|
205
|
+
:return_type => return_type
|
|
206
|
+
)
|
|
207
|
+
|
|
208
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
209
|
+
if @api_client.config.debugging
|
|
210
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#get_computer_use_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
211
|
+
end
|
|
212
|
+
return data, status_code, headers
|
|
213
|
+
end
|
|
214
|
+
|
|
215
|
+
# Get computer use status
|
|
216
|
+
# Get the current status of the computer use system
|
|
217
|
+
# @param [Hash] opts the optional parameters
|
|
218
|
+
# @return [ComputerUseStatusResponse]
|
|
219
|
+
def get_computer_use_system_status(opts = {})
|
|
220
|
+
data, _status_code, _headers = get_computer_use_system_status_with_http_info(opts)
|
|
221
|
+
data
|
|
222
|
+
end
|
|
223
|
+
|
|
224
|
+
# Get computer use status
|
|
225
|
+
# Get the current status of the computer use system
|
|
226
|
+
# @param [Hash] opts the optional parameters
|
|
227
|
+
# @return [Array<(ComputerUseStatusResponse, Integer, Hash)>] ComputerUseStatusResponse data, response status code and response headers
|
|
228
|
+
def get_computer_use_system_status_with_http_info(opts = {})
|
|
229
|
+
if @api_client.config.debugging
|
|
230
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.get_computer_use_system_status ...'
|
|
231
|
+
end
|
|
232
|
+
# resource path
|
|
233
|
+
local_var_path = '/computeruse/status'
|
|
234
|
+
|
|
235
|
+
# query parameters
|
|
236
|
+
query_params = opts[:query_params] || {}
|
|
237
|
+
|
|
238
|
+
# header parameters
|
|
239
|
+
header_params = opts[:header_params] || {}
|
|
240
|
+
# HTTP header 'Accept' (if needed)
|
|
241
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
242
|
+
|
|
243
|
+
# form parameters
|
|
244
|
+
form_params = opts[:form_params] || {}
|
|
245
|
+
|
|
246
|
+
# http body (model)
|
|
247
|
+
post_body = opts[:debug_body]
|
|
248
|
+
|
|
249
|
+
# return_type
|
|
250
|
+
return_type = opts[:debug_return_type] || 'ComputerUseStatusResponse'
|
|
251
|
+
|
|
252
|
+
# auth_names
|
|
253
|
+
auth_names = opts[:debug_auth_names] || []
|
|
254
|
+
|
|
255
|
+
new_options = opts.merge(
|
|
256
|
+
:operation => :"ComputerUseApi.get_computer_use_system_status",
|
|
257
|
+
:header_params => header_params,
|
|
258
|
+
:query_params => query_params,
|
|
259
|
+
:form_params => form_params,
|
|
260
|
+
:body => post_body,
|
|
261
|
+
:auth_names => auth_names,
|
|
262
|
+
:return_type => return_type
|
|
263
|
+
)
|
|
264
|
+
|
|
265
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
266
|
+
if @api_client.config.debugging
|
|
267
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#get_computer_use_system_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
268
|
+
end
|
|
269
|
+
return data, status_code, headers
|
|
270
|
+
end
|
|
271
|
+
|
|
272
|
+
# Get display information
|
|
273
|
+
# Get information about all available displays
|
|
274
|
+
# @param [Hash] opts the optional parameters
|
|
275
|
+
# @return [DisplayInfoResponse]
|
|
276
|
+
def get_display_info(opts = {})
|
|
277
|
+
data, _status_code, _headers = get_display_info_with_http_info(opts)
|
|
278
|
+
data
|
|
279
|
+
end
|
|
280
|
+
|
|
281
|
+
# Get display information
|
|
282
|
+
# Get information about all available displays
|
|
283
|
+
# @param [Hash] opts the optional parameters
|
|
284
|
+
# @return [Array<(DisplayInfoResponse, Integer, Hash)>] DisplayInfoResponse data, response status code and response headers
|
|
285
|
+
def get_display_info_with_http_info(opts = {})
|
|
286
|
+
if @api_client.config.debugging
|
|
287
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.get_display_info ...'
|
|
288
|
+
end
|
|
289
|
+
# resource path
|
|
290
|
+
local_var_path = '/computeruse/display/info'
|
|
291
|
+
|
|
292
|
+
# query parameters
|
|
293
|
+
query_params = opts[:query_params] || {}
|
|
294
|
+
|
|
295
|
+
# header parameters
|
|
296
|
+
header_params = opts[:header_params] || {}
|
|
297
|
+
# HTTP header 'Accept' (if needed)
|
|
298
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
299
|
+
|
|
300
|
+
# form parameters
|
|
301
|
+
form_params = opts[:form_params] || {}
|
|
302
|
+
|
|
303
|
+
# http body (model)
|
|
304
|
+
post_body = opts[:debug_body]
|
|
305
|
+
|
|
306
|
+
# return_type
|
|
307
|
+
return_type = opts[:debug_return_type] || 'DisplayInfoResponse'
|
|
308
|
+
|
|
309
|
+
# auth_names
|
|
310
|
+
auth_names = opts[:debug_auth_names] || []
|
|
311
|
+
|
|
312
|
+
new_options = opts.merge(
|
|
313
|
+
:operation => :"ComputerUseApi.get_display_info",
|
|
314
|
+
:header_params => header_params,
|
|
315
|
+
:query_params => query_params,
|
|
316
|
+
:form_params => form_params,
|
|
317
|
+
:body => post_body,
|
|
318
|
+
:auth_names => auth_names,
|
|
319
|
+
:return_type => return_type
|
|
320
|
+
)
|
|
321
|
+
|
|
322
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
323
|
+
if @api_client.config.debugging
|
|
324
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#get_display_info\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
325
|
+
end
|
|
326
|
+
return data, status_code, headers
|
|
327
|
+
end
|
|
328
|
+
|
|
329
|
+
# Get mouse position
|
|
330
|
+
# Get the current mouse cursor position
|
|
331
|
+
# @param [Hash] opts the optional parameters
|
|
332
|
+
# @return [MousePositionResponse]
|
|
333
|
+
def get_mouse_position(opts = {})
|
|
334
|
+
data, _status_code, _headers = get_mouse_position_with_http_info(opts)
|
|
335
|
+
data
|
|
336
|
+
end
|
|
337
|
+
|
|
338
|
+
# Get mouse position
|
|
339
|
+
# Get the current mouse cursor position
|
|
340
|
+
# @param [Hash] opts the optional parameters
|
|
341
|
+
# @return [Array<(MousePositionResponse, Integer, Hash)>] MousePositionResponse data, response status code and response headers
|
|
342
|
+
def get_mouse_position_with_http_info(opts = {})
|
|
343
|
+
if @api_client.config.debugging
|
|
344
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.get_mouse_position ...'
|
|
345
|
+
end
|
|
346
|
+
# resource path
|
|
347
|
+
local_var_path = '/computeruse/mouse/position'
|
|
348
|
+
|
|
349
|
+
# query parameters
|
|
350
|
+
query_params = opts[:query_params] || {}
|
|
351
|
+
|
|
352
|
+
# header parameters
|
|
353
|
+
header_params = opts[:header_params] || {}
|
|
354
|
+
# HTTP header 'Accept' (if needed)
|
|
355
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
356
|
+
|
|
357
|
+
# form parameters
|
|
358
|
+
form_params = opts[:form_params] || {}
|
|
359
|
+
|
|
360
|
+
# http body (model)
|
|
361
|
+
post_body = opts[:debug_body]
|
|
362
|
+
|
|
363
|
+
# return_type
|
|
364
|
+
return_type = opts[:debug_return_type] || 'MousePositionResponse'
|
|
365
|
+
|
|
366
|
+
# auth_names
|
|
367
|
+
auth_names = opts[:debug_auth_names] || []
|
|
368
|
+
|
|
369
|
+
new_options = opts.merge(
|
|
370
|
+
:operation => :"ComputerUseApi.get_mouse_position",
|
|
371
|
+
:header_params => header_params,
|
|
372
|
+
:query_params => query_params,
|
|
373
|
+
:form_params => form_params,
|
|
374
|
+
:body => post_body,
|
|
375
|
+
:auth_names => auth_names,
|
|
376
|
+
:return_type => return_type
|
|
377
|
+
)
|
|
378
|
+
|
|
379
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
380
|
+
if @api_client.config.debugging
|
|
381
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#get_mouse_position\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
382
|
+
end
|
|
383
|
+
return data, status_code, headers
|
|
384
|
+
end
|
|
385
|
+
|
|
386
|
+
# Get process errors
|
|
387
|
+
# Get errors for a specific computer use process
|
|
388
|
+
# @param process_name [String] Process name to get errors for
|
|
389
|
+
# @param [Hash] opts the optional parameters
|
|
390
|
+
# @return [ProcessErrorsResponse]
|
|
391
|
+
def get_process_errors(process_name, opts = {})
|
|
392
|
+
data, _status_code, _headers = get_process_errors_with_http_info(process_name, opts)
|
|
393
|
+
data
|
|
394
|
+
end
|
|
395
|
+
|
|
396
|
+
# Get process errors
|
|
397
|
+
# Get errors for a specific computer use process
|
|
398
|
+
# @param process_name [String] Process name to get errors for
|
|
399
|
+
# @param [Hash] opts the optional parameters
|
|
400
|
+
# @return [Array<(ProcessErrorsResponse, Integer, Hash)>] ProcessErrorsResponse data, response status code and response headers
|
|
401
|
+
def get_process_errors_with_http_info(process_name, opts = {})
|
|
402
|
+
if @api_client.config.debugging
|
|
403
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.get_process_errors ...'
|
|
404
|
+
end
|
|
405
|
+
# verify the required parameter 'process_name' is set
|
|
406
|
+
if @api_client.config.client_side_validation && process_name.nil?
|
|
407
|
+
fail ArgumentError, "Missing the required parameter 'process_name' when calling ComputerUseApi.get_process_errors"
|
|
408
|
+
end
|
|
409
|
+
# resource path
|
|
410
|
+
local_var_path = '/computeruse/process/{processName}/errors'.sub('{' + 'processName' + '}', CGI.escape(process_name.to_s))
|
|
411
|
+
|
|
412
|
+
# query parameters
|
|
413
|
+
query_params = opts[:query_params] || {}
|
|
414
|
+
|
|
415
|
+
# header parameters
|
|
416
|
+
header_params = opts[:header_params] || {}
|
|
417
|
+
# HTTP header 'Accept' (if needed)
|
|
418
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
419
|
+
|
|
420
|
+
# form parameters
|
|
421
|
+
form_params = opts[:form_params] || {}
|
|
422
|
+
|
|
423
|
+
# http body (model)
|
|
424
|
+
post_body = opts[:debug_body]
|
|
425
|
+
|
|
426
|
+
# return_type
|
|
427
|
+
return_type = opts[:debug_return_type] || 'ProcessErrorsResponse'
|
|
428
|
+
|
|
429
|
+
# auth_names
|
|
430
|
+
auth_names = opts[:debug_auth_names] || []
|
|
431
|
+
|
|
432
|
+
new_options = opts.merge(
|
|
433
|
+
:operation => :"ComputerUseApi.get_process_errors",
|
|
434
|
+
:header_params => header_params,
|
|
435
|
+
:query_params => query_params,
|
|
436
|
+
:form_params => form_params,
|
|
437
|
+
:body => post_body,
|
|
438
|
+
:auth_names => auth_names,
|
|
439
|
+
:return_type => return_type
|
|
440
|
+
)
|
|
441
|
+
|
|
442
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
443
|
+
if @api_client.config.debugging
|
|
444
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#get_process_errors\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
445
|
+
end
|
|
446
|
+
return data, status_code, headers
|
|
447
|
+
end
|
|
448
|
+
|
|
449
|
+
# Get process logs
|
|
450
|
+
# Get logs for a specific computer use process
|
|
451
|
+
# @param process_name [String] Process name to get logs for
|
|
452
|
+
# @param [Hash] opts the optional parameters
|
|
453
|
+
# @return [ProcessLogsResponse]
|
|
454
|
+
def get_process_logs(process_name, opts = {})
|
|
455
|
+
data, _status_code, _headers = get_process_logs_with_http_info(process_name, opts)
|
|
456
|
+
data
|
|
457
|
+
end
|
|
458
|
+
|
|
459
|
+
# Get process logs
|
|
460
|
+
# Get logs for a specific computer use process
|
|
461
|
+
# @param process_name [String] Process name to get logs for
|
|
462
|
+
# @param [Hash] opts the optional parameters
|
|
463
|
+
# @return [Array<(ProcessLogsResponse, Integer, Hash)>] ProcessLogsResponse data, response status code and response headers
|
|
464
|
+
def get_process_logs_with_http_info(process_name, opts = {})
|
|
465
|
+
if @api_client.config.debugging
|
|
466
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.get_process_logs ...'
|
|
467
|
+
end
|
|
468
|
+
# verify the required parameter 'process_name' is set
|
|
469
|
+
if @api_client.config.client_side_validation && process_name.nil?
|
|
470
|
+
fail ArgumentError, "Missing the required parameter 'process_name' when calling ComputerUseApi.get_process_logs"
|
|
471
|
+
end
|
|
472
|
+
# resource path
|
|
473
|
+
local_var_path = '/computeruse/process/{processName}/logs'.sub('{' + 'processName' + '}', CGI.escape(process_name.to_s))
|
|
474
|
+
|
|
475
|
+
# query parameters
|
|
476
|
+
query_params = opts[:query_params] || {}
|
|
477
|
+
|
|
478
|
+
# header parameters
|
|
479
|
+
header_params = opts[:header_params] || {}
|
|
480
|
+
# HTTP header 'Accept' (if needed)
|
|
481
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
482
|
+
|
|
483
|
+
# form parameters
|
|
484
|
+
form_params = opts[:form_params] || {}
|
|
485
|
+
|
|
486
|
+
# http body (model)
|
|
487
|
+
post_body = opts[:debug_body]
|
|
488
|
+
|
|
489
|
+
# return_type
|
|
490
|
+
return_type = opts[:debug_return_type] || 'ProcessLogsResponse'
|
|
491
|
+
|
|
492
|
+
# auth_names
|
|
493
|
+
auth_names = opts[:debug_auth_names] || []
|
|
494
|
+
|
|
495
|
+
new_options = opts.merge(
|
|
496
|
+
:operation => :"ComputerUseApi.get_process_logs",
|
|
497
|
+
:header_params => header_params,
|
|
498
|
+
:query_params => query_params,
|
|
499
|
+
:form_params => form_params,
|
|
500
|
+
:body => post_body,
|
|
501
|
+
:auth_names => auth_names,
|
|
502
|
+
:return_type => return_type
|
|
503
|
+
)
|
|
504
|
+
|
|
505
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
506
|
+
if @api_client.config.debugging
|
|
507
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#get_process_logs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
508
|
+
end
|
|
509
|
+
return data, status_code, headers
|
|
510
|
+
end
|
|
511
|
+
|
|
512
|
+
# Get specific process status
|
|
513
|
+
# Check if a specific computer use process is running
|
|
514
|
+
# @param process_name [String] Process name to check
|
|
515
|
+
# @param [Hash] opts the optional parameters
|
|
516
|
+
# @return [ProcessStatusResponse]
|
|
517
|
+
def get_process_status(process_name, opts = {})
|
|
518
|
+
data, _status_code, _headers = get_process_status_with_http_info(process_name, opts)
|
|
519
|
+
data
|
|
520
|
+
end
|
|
521
|
+
|
|
522
|
+
# Get specific process status
|
|
523
|
+
# Check if a specific computer use process is running
|
|
524
|
+
# @param process_name [String] Process name to check
|
|
525
|
+
# @param [Hash] opts the optional parameters
|
|
526
|
+
# @return [Array<(ProcessStatusResponse, Integer, Hash)>] ProcessStatusResponse data, response status code and response headers
|
|
527
|
+
def get_process_status_with_http_info(process_name, opts = {})
|
|
528
|
+
if @api_client.config.debugging
|
|
529
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.get_process_status ...'
|
|
530
|
+
end
|
|
531
|
+
# verify the required parameter 'process_name' is set
|
|
532
|
+
if @api_client.config.client_side_validation && process_name.nil?
|
|
533
|
+
fail ArgumentError, "Missing the required parameter 'process_name' when calling ComputerUseApi.get_process_status"
|
|
534
|
+
end
|
|
535
|
+
# resource path
|
|
536
|
+
local_var_path = '/computeruse/process/{processName}/status'.sub('{' + 'processName' + '}', CGI.escape(process_name.to_s))
|
|
537
|
+
|
|
538
|
+
# query parameters
|
|
539
|
+
query_params = opts[:query_params] || {}
|
|
540
|
+
|
|
541
|
+
# header parameters
|
|
542
|
+
header_params = opts[:header_params] || {}
|
|
543
|
+
# HTTP header 'Accept' (if needed)
|
|
544
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
545
|
+
|
|
546
|
+
# form parameters
|
|
547
|
+
form_params = opts[:form_params] || {}
|
|
548
|
+
|
|
549
|
+
# http body (model)
|
|
550
|
+
post_body = opts[:debug_body]
|
|
551
|
+
|
|
552
|
+
# return_type
|
|
553
|
+
return_type = opts[:debug_return_type] || 'ProcessStatusResponse'
|
|
554
|
+
|
|
555
|
+
# auth_names
|
|
556
|
+
auth_names = opts[:debug_auth_names] || []
|
|
557
|
+
|
|
558
|
+
new_options = opts.merge(
|
|
559
|
+
:operation => :"ComputerUseApi.get_process_status",
|
|
560
|
+
:header_params => header_params,
|
|
561
|
+
:query_params => query_params,
|
|
562
|
+
:form_params => form_params,
|
|
563
|
+
:body => post_body,
|
|
564
|
+
:auth_names => auth_names,
|
|
565
|
+
:return_type => return_type
|
|
566
|
+
)
|
|
567
|
+
|
|
568
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
569
|
+
if @api_client.config.debugging
|
|
570
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#get_process_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
571
|
+
end
|
|
572
|
+
return data, status_code, headers
|
|
573
|
+
end
|
|
574
|
+
|
|
575
|
+
# Get windows information
|
|
576
|
+
# Get information about all open windows
|
|
577
|
+
# @param [Hash] opts the optional parameters
|
|
578
|
+
# @return [WindowsResponse]
|
|
579
|
+
def get_windows(opts = {})
|
|
580
|
+
data, _status_code, _headers = get_windows_with_http_info(opts)
|
|
581
|
+
data
|
|
582
|
+
end
|
|
583
|
+
|
|
584
|
+
# Get windows information
|
|
585
|
+
# Get information about all open windows
|
|
586
|
+
# @param [Hash] opts the optional parameters
|
|
587
|
+
# @return [Array<(WindowsResponse, Integer, Hash)>] WindowsResponse data, response status code and response headers
|
|
588
|
+
def get_windows_with_http_info(opts = {})
|
|
589
|
+
if @api_client.config.debugging
|
|
590
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.get_windows ...'
|
|
591
|
+
end
|
|
592
|
+
# resource path
|
|
593
|
+
local_var_path = '/computeruse/display/windows'
|
|
594
|
+
|
|
595
|
+
# query parameters
|
|
596
|
+
query_params = opts[:query_params] || {}
|
|
597
|
+
|
|
598
|
+
# header parameters
|
|
599
|
+
header_params = opts[:header_params] || {}
|
|
600
|
+
# HTTP header 'Accept' (if needed)
|
|
601
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
602
|
+
|
|
603
|
+
# form parameters
|
|
604
|
+
form_params = opts[:form_params] || {}
|
|
605
|
+
|
|
606
|
+
# http body (model)
|
|
607
|
+
post_body = opts[:debug_body]
|
|
608
|
+
|
|
609
|
+
# return_type
|
|
610
|
+
return_type = opts[:debug_return_type] || 'WindowsResponse'
|
|
611
|
+
|
|
612
|
+
# auth_names
|
|
613
|
+
auth_names = opts[:debug_auth_names] || []
|
|
614
|
+
|
|
615
|
+
new_options = opts.merge(
|
|
616
|
+
:operation => :"ComputerUseApi.get_windows",
|
|
617
|
+
:header_params => header_params,
|
|
618
|
+
:query_params => query_params,
|
|
619
|
+
:form_params => form_params,
|
|
620
|
+
:body => post_body,
|
|
621
|
+
:auth_names => auth_names,
|
|
622
|
+
:return_type => return_type
|
|
623
|
+
)
|
|
624
|
+
|
|
625
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
626
|
+
if @api_client.config.debugging
|
|
627
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#get_windows\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
628
|
+
end
|
|
629
|
+
return data, status_code, headers
|
|
630
|
+
end
|
|
631
|
+
|
|
632
|
+
# Move mouse cursor
|
|
633
|
+
# Move the mouse cursor to the specified coordinates
|
|
634
|
+
# @param request [MouseMoveRequest] Mouse move request
|
|
635
|
+
# @param [Hash] opts the optional parameters
|
|
636
|
+
# @return [MousePositionResponse]
|
|
637
|
+
def move_mouse(request, opts = {})
|
|
638
|
+
data, _status_code, _headers = move_mouse_with_http_info(request, opts)
|
|
639
|
+
data
|
|
640
|
+
end
|
|
641
|
+
|
|
642
|
+
# Move mouse cursor
|
|
643
|
+
# Move the mouse cursor to the specified coordinates
|
|
644
|
+
# @param request [MouseMoveRequest] Mouse move request
|
|
645
|
+
# @param [Hash] opts the optional parameters
|
|
646
|
+
# @return [Array<(MousePositionResponse, Integer, Hash)>] MousePositionResponse data, response status code and response headers
|
|
647
|
+
def move_mouse_with_http_info(request, opts = {})
|
|
648
|
+
if @api_client.config.debugging
|
|
649
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.move_mouse ...'
|
|
650
|
+
end
|
|
651
|
+
# verify the required parameter 'request' is set
|
|
652
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
653
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ComputerUseApi.move_mouse"
|
|
654
|
+
end
|
|
655
|
+
# resource path
|
|
656
|
+
local_var_path = '/computeruse/mouse/move'
|
|
657
|
+
|
|
658
|
+
# query parameters
|
|
659
|
+
query_params = opts[:query_params] || {}
|
|
660
|
+
|
|
661
|
+
# header parameters
|
|
662
|
+
header_params = opts[:header_params] || {}
|
|
663
|
+
# HTTP header 'Accept' (if needed)
|
|
664
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
665
|
+
# HTTP header 'Content-Type'
|
|
666
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
667
|
+
if !content_type.nil?
|
|
668
|
+
header_params['Content-Type'] = content_type
|
|
669
|
+
end
|
|
670
|
+
|
|
671
|
+
# form parameters
|
|
672
|
+
form_params = opts[:form_params] || {}
|
|
673
|
+
|
|
674
|
+
# http body (model)
|
|
675
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
676
|
+
|
|
677
|
+
# return_type
|
|
678
|
+
return_type = opts[:debug_return_type] || 'MousePositionResponse'
|
|
679
|
+
|
|
680
|
+
# auth_names
|
|
681
|
+
auth_names = opts[:debug_auth_names] || []
|
|
682
|
+
|
|
683
|
+
new_options = opts.merge(
|
|
684
|
+
:operation => :"ComputerUseApi.move_mouse",
|
|
685
|
+
:header_params => header_params,
|
|
686
|
+
:query_params => query_params,
|
|
687
|
+
:form_params => form_params,
|
|
688
|
+
:body => post_body,
|
|
689
|
+
:auth_names => auth_names,
|
|
690
|
+
:return_type => return_type
|
|
691
|
+
)
|
|
692
|
+
|
|
693
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
694
|
+
if @api_client.config.debugging
|
|
695
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#move_mouse\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
696
|
+
end
|
|
697
|
+
return data, status_code, headers
|
|
698
|
+
end
|
|
699
|
+
|
|
700
|
+
# Press hotkey
|
|
701
|
+
# Press a hotkey combination (e.g., ctrl+c, cmd+v)
|
|
702
|
+
# @param request [KeyboardHotkeyRequest] Hotkey press request
|
|
703
|
+
# @param [Hash] opts the optional parameters
|
|
704
|
+
# @return [Object]
|
|
705
|
+
def press_hotkey(request, opts = {})
|
|
706
|
+
data, _status_code, _headers = press_hotkey_with_http_info(request, opts)
|
|
707
|
+
data
|
|
708
|
+
end
|
|
709
|
+
|
|
710
|
+
# Press hotkey
|
|
711
|
+
# Press a hotkey combination (e.g., ctrl+c, cmd+v)
|
|
712
|
+
# @param request [KeyboardHotkeyRequest] Hotkey press request
|
|
713
|
+
# @param [Hash] opts the optional parameters
|
|
714
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
715
|
+
def press_hotkey_with_http_info(request, opts = {})
|
|
716
|
+
if @api_client.config.debugging
|
|
717
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.press_hotkey ...'
|
|
718
|
+
end
|
|
719
|
+
# verify the required parameter 'request' is set
|
|
720
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
721
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ComputerUseApi.press_hotkey"
|
|
722
|
+
end
|
|
723
|
+
# resource path
|
|
724
|
+
local_var_path = '/computeruse/keyboard/hotkey'
|
|
725
|
+
|
|
726
|
+
# query parameters
|
|
727
|
+
query_params = opts[:query_params] || {}
|
|
728
|
+
|
|
729
|
+
# header parameters
|
|
730
|
+
header_params = opts[:header_params] || {}
|
|
731
|
+
# HTTP header 'Accept' (if needed)
|
|
732
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
733
|
+
# HTTP header 'Content-Type'
|
|
734
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
735
|
+
if !content_type.nil?
|
|
736
|
+
header_params['Content-Type'] = content_type
|
|
737
|
+
end
|
|
738
|
+
|
|
739
|
+
# form parameters
|
|
740
|
+
form_params = opts[:form_params] || {}
|
|
741
|
+
|
|
742
|
+
# http body (model)
|
|
743
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
744
|
+
|
|
745
|
+
# return_type
|
|
746
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
747
|
+
|
|
748
|
+
# auth_names
|
|
749
|
+
auth_names = opts[:debug_auth_names] || []
|
|
750
|
+
|
|
751
|
+
new_options = opts.merge(
|
|
752
|
+
:operation => :"ComputerUseApi.press_hotkey",
|
|
753
|
+
:header_params => header_params,
|
|
754
|
+
:query_params => query_params,
|
|
755
|
+
:form_params => form_params,
|
|
756
|
+
:body => post_body,
|
|
757
|
+
:auth_names => auth_names,
|
|
758
|
+
:return_type => return_type
|
|
759
|
+
)
|
|
760
|
+
|
|
761
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
762
|
+
if @api_client.config.debugging
|
|
763
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#press_hotkey\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
764
|
+
end
|
|
765
|
+
return data, status_code, headers
|
|
766
|
+
end
|
|
767
|
+
|
|
768
|
+
# Press key
|
|
769
|
+
# Press a key with optional modifiers
|
|
770
|
+
# @param request [KeyboardPressRequest] Key press request
|
|
771
|
+
# @param [Hash] opts the optional parameters
|
|
772
|
+
# @return [Object]
|
|
773
|
+
def press_key(request, opts = {})
|
|
774
|
+
data, _status_code, _headers = press_key_with_http_info(request, opts)
|
|
775
|
+
data
|
|
776
|
+
end
|
|
777
|
+
|
|
778
|
+
# Press key
|
|
779
|
+
# Press a key with optional modifiers
|
|
780
|
+
# @param request [KeyboardPressRequest] Key press request
|
|
781
|
+
# @param [Hash] opts the optional parameters
|
|
782
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
783
|
+
def press_key_with_http_info(request, opts = {})
|
|
784
|
+
if @api_client.config.debugging
|
|
785
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.press_key ...'
|
|
786
|
+
end
|
|
787
|
+
# verify the required parameter 'request' is set
|
|
788
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
789
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ComputerUseApi.press_key"
|
|
790
|
+
end
|
|
791
|
+
# resource path
|
|
792
|
+
local_var_path = '/computeruse/keyboard/key'
|
|
793
|
+
|
|
794
|
+
# query parameters
|
|
795
|
+
query_params = opts[:query_params] || {}
|
|
796
|
+
|
|
797
|
+
# header parameters
|
|
798
|
+
header_params = opts[:header_params] || {}
|
|
799
|
+
# HTTP header 'Accept' (if needed)
|
|
800
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
801
|
+
# HTTP header 'Content-Type'
|
|
802
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
803
|
+
if !content_type.nil?
|
|
804
|
+
header_params['Content-Type'] = content_type
|
|
805
|
+
end
|
|
806
|
+
|
|
807
|
+
# form parameters
|
|
808
|
+
form_params = opts[:form_params] || {}
|
|
809
|
+
|
|
810
|
+
# http body (model)
|
|
811
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
812
|
+
|
|
813
|
+
# return_type
|
|
814
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
815
|
+
|
|
816
|
+
# auth_names
|
|
817
|
+
auth_names = opts[:debug_auth_names] || []
|
|
818
|
+
|
|
819
|
+
new_options = opts.merge(
|
|
820
|
+
:operation => :"ComputerUseApi.press_key",
|
|
821
|
+
:header_params => header_params,
|
|
822
|
+
:query_params => query_params,
|
|
823
|
+
:form_params => form_params,
|
|
824
|
+
:body => post_body,
|
|
825
|
+
:auth_names => auth_names,
|
|
826
|
+
:return_type => return_type
|
|
827
|
+
)
|
|
828
|
+
|
|
829
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
830
|
+
if @api_client.config.debugging
|
|
831
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#press_key\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
832
|
+
end
|
|
833
|
+
return data, status_code, headers
|
|
834
|
+
end
|
|
835
|
+
|
|
836
|
+
# Restart specific process
|
|
837
|
+
# Restart a specific computer use process
|
|
838
|
+
# @param process_name [String] Process name to restart
|
|
839
|
+
# @param [Hash] opts the optional parameters
|
|
840
|
+
# @return [ProcessRestartResponse]
|
|
841
|
+
def restart_process(process_name, opts = {})
|
|
842
|
+
data, _status_code, _headers = restart_process_with_http_info(process_name, opts)
|
|
843
|
+
data
|
|
844
|
+
end
|
|
845
|
+
|
|
846
|
+
# Restart specific process
|
|
847
|
+
# Restart a specific computer use process
|
|
848
|
+
# @param process_name [String] Process name to restart
|
|
849
|
+
# @param [Hash] opts the optional parameters
|
|
850
|
+
# @return [Array<(ProcessRestartResponse, Integer, Hash)>] ProcessRestartResponse data, response status code and response headers
|
|
851
|
+
def restart_process_with_http_info(process_name, opts = {})
|
|
852
|
+
if @api_client.config.debugging
|
|
853
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.restart_process ...'
|
|
854
|
+
end
|
|
855
|
+
# verify the required parameter 'process_name' is set
|
|
856
|
+
if @api_client.config.client_side_validation && process_name.nil?
|
|
857
|
+
fail ArgumentError, "Missing the required parameter 'process_name' when calling ComputerUseApi.restart_process"
|
|
858
|
+
end
|
|
859
|
+
# resource path
|
|
860
|
+
local_var_path = '/computeruse/process/{processName}/restart'.sub('{' + 'processName' + '}', CGI.escape(process_name.to_s))
|
|
861
|
+
|
|
862
|
+
# query parameters
|
|
863
|
+
query_params = opts[:query_params] || {}
|
|
864
|
+
|
|
865
|
+
# header parameters
|
|
866
|
+
header_params = opts[:header_params] || {}
|
|
867
|
+
# HTTP header 'Accept' (if needed)
|
|
868
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
869
|
+
|
|
870
|
+
# form parameters
|
|
871
|
+
form_params = opts[:form_params] || {}
|
|
872
|
+
|
|
873
|
+
# http body (model)
|
|
874
|
+
post_body = opts[:debug_body]
|
|
875
|
+
|
|
876
|
+
# return_type
|
|
877
|
+
return_type = opts[:debug_return_type] || 'ProcessRestartResponse'
|
|
878
|
+
|
|
879
|
+
# auth_names
|
|
880
|
+
auth_names = opts[:debug_auth_names] || []
|
|
881
|
+
|
|
882
|
+
new_options = opts.merge(
|
|
883
|
+
:operation => :"ComputerUseApi.restart_process",
|
|
884
|
+
:header_params => header_params,
|
|
885
|
+
:query_params => query_params,
|
|
886
|
+
:form_params => form_params,
|
|
887
|
+
:body => post_body,
|
|
888
|
+
:auth_names => auth_names,
|
|
889
|
+
:return_type => return_type
|
|
890
|
+
)
|
|
891
|
+
|
|
892
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
893
|
+
if @api_client.config.debugging
|
|
894
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#restart_process\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
895
|
+
end
|
|
896
|
+
return data, status_code, headers
|
|
897
|
+
end
|
|
898
|
+
|
|
899
|
+
# Scroll mouse wheel
|
|
900
|
+
# Scroll the mouse wheel at the specified coordinates
|
|
901
|
+
# @param request [MouseScrollRequest] Mouse scroll request
|
|
902
|
+
# @param [Hash] opts the optional parameters
|
|
903
|
+
# @return [ScrollResponse]
|
|
904
|
+
def scroll(request, opts = {})
|
|
905
|
+
data, _status_code, _headers = scroll_with_http_info(request, opts)
|
|
906
|
+
data
|
|
907
|
+
end
|
|
908
|
+
|
|
909
|
+
# Scroll mouse wheel
|
|
910
|
+
# Scroll the mouse wheel at the specified coordinates
|
|
911
|
+
# @param request [MouseScrollRequest] Mouse scroll request
|
|
912
|
+
# @param [Hash] opts the optional parameters
|
|
913
|
+
# @return [Array<(ScrollResponse, Integer, Hash)>] ScrollResponse data, response status code and response headers
|
|
914
|
+
def scroll_with_http_info(request, opts = {})
|
|
915
|
+
if @api_client.config.debugging
|
|
916
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.scroll ...'
|
|
917
|
+
end
|
|
918
|
+
# verify the required parameter 'request' is set
|
|
919
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
920
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ComputerUseApi.scroll"
|
|
921
|
+
end
|
|
922
|
+
# resource path
|
|
923
|
+
local_var_path = '/computeruse/mouse/scroll'
|
|
924
|
+
|
|
925
|
+
# query parameters
|
|
926
|
+
query_params = opts[:query_params] || {}
|
|
927
|
+
|
|
928
|
+
# header parameters
|
|
929
|
+
header_params = opts[:header_params] || {}
|
|
930
|
+
# HTTP header 'Accept' (if needed)
|
|
931
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
932
|
+
# HTTP header 'Content-Type'
|
|
933
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
934
|
+
if !content_type.nil?
|
|
935
|
+
header_params['Content-Type'] = content_type
|
|
936
|
+
end
|
|
937
|
+
|
|
938
|
+
# form parameters
|
|
939
|
+
form_params = opts[:form_params] || {}
|
|
940
|
+
|
|
941
|
+
# http body (model)
|
|
942
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
943
|
+
|
|
944
|
+
# return_type
|
|
945
|
+
return_type = opts[:debug_return_type] || 'ScrollResponse'
|
|
946
|
+
|
|
947
|
+
# auth_names
|
|
948
|
+
auth_names = opts[:debug_auth_names] || []
|
|
949
|
+
|
|
950
|
+
new_options = opts.merge(
|
|
951
|
+
:operation => :"ComputerUseApi.scroll",
|
|
952
|
+
:header_params => header_params,
|
|
953
|
+
:query_params => query_params,
|
|
954
|
+
:form_params => form_params,
|
|
955
|
+
:body => post_body,
|
|
956
|
+
:auth_names => auth_names,
|
|
957
|
+
:return_type => return_type
|
|
958
|
+
)
|
|
959
|
+
|
|
960
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
961
|
+
if @api_client.config.debugging
|
|
962
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#scroll\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
963
|
+
end
|
|
964
|
+
return data, status_code, headers
|
|
965
|
+
end
|
|
966
|
+
|
|
967
|
+
# Start computer use processes
|
|
968
|
+
# Start all computer use processes and return their status
|
|
969
|
+
# @param [Hash] opts the optional parameters
|
|
970
|
+
# @return [ComputerUseStartResponse]
|
|
971
|
+
def start_computer_use(opts = {})
|
|
972
|
+
data, _status_code, _headers = start_computer_use_with_http_info(opts)
|
|
973
|
+
data
|
|
974
|
+
end
|
|
975
|
+
|
|
976
|
+
# Start computer use processes
|
|
977
|
+
# Start all computer use processes and return their status
|
|
978
|
+
# @param [Hash] opts the optional parameters
|
|
979
|
+
# @return [Array<(ComputerUseStartResponse, Integer, Hash)>] ComputerUseStartResponse data, response status code and response headers
|
|
980
|
+
def start_computer_use_with_http_info(opts = {})
|
|
981
|
+
if @api_client.config.debugging
|
|
982
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.start_computer_use ...'
|
|
983
|
+
end
|
|
984
|
+
# resource path
|
|
985
|
+
local_var_path = '/computeruse/start'
|
|
986
|
+
|
|
987
|
+
# query parameters
|
|
988
|
+
query_params = opts[:query_params] || {}
|
|
989
|
+
|
|
990
|
+
# header parameters
|
|
991
|
+
header_params = opts[:header_params] || {}
|
|
992
|
+
# HTTP header 'Accept' (if needed)
|
|
993
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
994
|
+
|
|
995
|
+
# form parameters
|
|
996
|
+
form_params = opts[:form_params] || {}
|
|
997
|
+
|
|
998
|
+
# http body (model)
|
|
999
|
+
post_body = opts[:debug_body]
|
|
1000
|
+
|
|
1001
|
+
# return_type
|
|
1002
|
+
return_type = opts[:debug_return_type] || 'ComputerUseStartResponse'
|
|
1003
|
+
|
|
1004
|
+
# auth_names
|
|
1005
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1006
|
+
|
|
1007
|
+
new_options = opts.merge(
|
|
1008
|
+
:operation => :"ComputerUseApi.start_computer_use",
|
|
1009
|
+
:header_params => header_params,
|
|
1010
|
+
:query_params => query_params,
|
|
1011
|
+
:form_params => form_params,
|
|
1012
|
+
:body => post_body,
|
|
1013
|
+
:auth_names => auth_names,
|
|
1014
|
+
:return_type => return_type
|
|
1015
|
+
)
|
|
1016
|
+
|
|
1017
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1018
|
+
if @api_client.config.debugging
|
|
1019
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#start_computer_use\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1020
|
+
end
|
|
1021
|
+
return data, status_code, headers
|
|
1022
|
+
end
|
|
1023
|
+
|
|
1024
|
+
# Stop computer use processes
|
|
1025
|
+
# Stop all computer use processes and return their status
|
|
1026
|
+
# @param [Hash] opts the optional parameters
|
|
1027
|
+
# @return [ComputerUseStopResponse]
|
|
1028
|
+
def stop_computer_use(opts = {})
|
|
1029
|
+
data, _status_code, _headers = stop_computer_use_with_http_info(opts)
|
|
1030
|
+
data
|
|
1031
|
+
end
|
|
1032
|
+
|
|
1033
|
+
# Stop computer use processes
|
|
1034
|
+
# Stop all computer use processes and return their status
|
|
1035
|
+
# @param [Hash] opts the optional parameters
|
|
1036
|
+
# @return [Array<(ComputerUseStopResponse, Integer, Hash)>] ComputerUseStopResponse data, response status code and response headers
|
|
1037
|
+
def stop_computer_use_with_http_info(opts = {})
|
|
1038
|
+
if @api_client.config.debugging
|
|
1039
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.stop_computer_use ...'
|
|
1040
|
+
end
|
|
1041
|
+
# resource path
|
|
1042
|
+
local_var_path = '/computeruse/stop'
|
|
1043
|
+
|
|
1044
|
+
# query parameters
|
|
1045
|
+
query_params = opts[:query_params] || {}
|
|
1046
|
+
|
|
1047
|
+
# header parameters
|
|
1048
|
+
header_params = opts[:header_params] || {}
|
|
1049
|
+
# HTTP header 'Accept' (if needed)
|
|
1050
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1051
|
+
|
|
1052
|
+
# form parameters
|
|
1053
|
+
form_params = opts[:form_params] || {}
|
|
1054
|
+
|
|
1055
|
+
# http body (model)
|
|
1056
|
+
post_body = opts[:debug_body]
|
|
1057
|
+
|
|
1058
|
+
# return_type
|
|
1059
|
+
return_type = opts[:debug_return_type] || 'ComputerUseStopResponse'
|
|
1060
|
+
|
|
1061
|
+
# auth_names
|
|
1062
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1063
|
+
|
|
1064
|
+
new_options = opts.merge(
|
|
1065
|
+
:operation => :"ComputerUseApi.stop_computer_use",
|
|
1066
|
+
:header_params => header_params,
|
|
1067
|
+
:query_params => query_params,
|
|
1068
|
+
:form_params => form_params,
|
|
1069
|
+
:body => post_body,
|
|
1070
|
+
:auth_names => auth_names,
|
|
1071
|
+
:return_type => return_type
|
|
1072
|
+
)
|
|
1073
|
+
|
|
1074
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1075
|
+
if @api_client.config.debugging
|
|
1076
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#stop_computer_use\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1077
|
+
end
|
|
1078
|
+
return data, status_code, headers
|
|
1079
|
+
end
|
|
1080
|
+
|
|
1081
|
+
# Take a compressed region screenshot
|
|
1082
|
+
# Take a compressed screenshot of a specific region of the screen
|
|
1083
|
+
# @param x [Integer] X coordinate of the region
|
|
1084
|
+
# @param y [Integer] Y coordinate of the region
|
|
1085
|
+
# @param width [Integer] Width of the region
|
|
1086
|
+
# @param height [Integer] Height of the region
|
|
1087
|
+
# @param [Hash] opts the optional parameters
|
|
1088
|
+
# @option opts [Boolean] :show_cursor Whether to show cursor in screenshot
|
|
1089
|
+
# @option opts [String] :format Image format (png or jpeg)
|
|
1090
|
+
# @option opts [Integer] :quality JPEG quality (1-100)
|
|
1091
|
+
# @option opts [Float] :scale Scale factor (0.1-1.0)
|
|
1092
|
+
# @return [ScreenshotResponse]
|
|
1093
|
+
def take_compressed_region_screenshot(x, y, width, height, opts = {})
|
|
1094
|
+
data, _status_code, _headers = take_compressed_region_screenshot_with_http_info(x, y, width, height, opts)
|
|
1095
|
+
data
|
|
1096
|
+
end
|
|
1097
|
+
|
|
1098
|
+
# Take a compressed region screenshot
|
|
1099
|
+
# Take a compressed screenshot of a specific region of the screen
|
|
1100
|
+
# @param x [Integer] X coordinate of the region
|
|
1101
|
+
# @param y [Integer] Y coordinate of the region
|
|
1102
|
+
# @param width [Integer] Width of the region
|
|
1103
|
+
# @param height [Integer] Height of the region
|
|
1104
|
+
# @param [Hash] opts the optional parameters
|
|
1105
|
+
# @option opts [Boolean] :show_cursor Whether to show cursor in screenshot
|
|
1106
|
+
# @option opts [String] :format Image format (png or jpeg)
|
|
1107
|
+
# @option opts [Integer] :quality JPEG quality (1-100)
|
|
1108
|
+
# @option opts [Float] :scale Scale factor (0.1-1.0)
|
|
1109
|
+
# @return [Array<(ScreenshotResponse, Integer, Hash)>] ScreenshotResponse data, response status code and response headers
|
|
1110
|
+
def take_compressed_region_screenshot_with_http_info(x, y, width, height, opts = {})
|
|
1111
|
+
if @api_client.config.debugging
|
|
1112
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.take_compressed_region_screenshot ...'
|
|
1113
|
+
end
|
|
1114
|
+
# verify the required parameter 'x' is set
|
|
1115
|
+
if @api_client.config.client_side_validation && x.nil?
|
|
1116
|
+
fail ArgumentError, "Missing the required parameter 'x' when calling ComputerUseApi.take_compressed_region_screenshot"
|
|
1117
|
+
end
|
|
1118
|
+
# verify the required parameter 'y' is set
|
|
1119
|
+
if @api_client.config.client_side_validation && y.nil?
|
|
1120
|
+
fail ArgumentError, "Missing the required parameter 'y' when calling ComputerUseApi.take_compressed_region_screenshot"
|
|
1121
|
+
end
|
|
1122
|
+
# verify the required parameter 'width' is set
|
|
1123
|
+
if @api_client.config.client_side_validation && width.nil?
|
|
1124
|
+
fail ArgumentError, "Missing the required parameter 'width' when calling ComputerUseApi.take_compressed_region_screenshot"
|
|
1125
|
+
end
|
|
1126
|
+
# verify the required parameter 'height' is set
|
|
1127
|
+
if @api_client.config.client_side_validation && height.nil?
|
|
1128
|
+
fail ArgumentError, "Missing the required parameter 'height' when calling ComputerUseApi.take_compressed_region_screenshot"
|
|
1129
|
+
end
|
|
1130
|
+
# resource path
|
|
1131
|
+
local_var_path = '/computeruse/screenshot/region/compressed'
|
|
1132
|
+
|
|
1133
|
+
# query parameters
|
|
1134
|
+
query_params = opts[:query_params] || {}
|
|
1135
|
+
query_params[:'x'] = x
|
|
1136
|
+
query_params[:'y'] = y
|
|
1137
|
+
query_params[:'width'] = width
|
|
1138
|
+
query_params[:'height'] = height
|
|
1139
|
+
query_params[:'showCursor'] = opts[:'show_cursor'] if !opts[:'show_cursor'].nil?
|
|
1140
|
+
query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
|
|
1141
|
+
query_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?
|
|
1142
|
+
query_params[:'scale'] = opts[:'scale'] if !opts[:'scale'].nil?
|
|
1143
|
+
|
|
1144
|
+
# header parameters
|
|
1145
|
+
header_params = opts[:header_params] || {}
|
|
1146
|
+
# HTTP header 'Accept' (if needed)
|
|
1147
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1148
|
+
|
|
1149
|
+
# form parameters
|
|
1150
|
+
form_params = opts[:form_params] || {}
|
|
1151
|
+
|
|
1152
|
+
# http body (model)
|
|
1153
|
+
post_body = opts[:debug_body]
|
|
1154
|
+
|
|
1155
|
+
# return_type
|
|
1156
|
+
return_type = opts[:debug_return_type] || 'ScreenshotResponse'
|
|
1157
|
+
|
|
1158
|
+
# auth_names
|
|
1159
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1160
|
+
|
|
1161
|
+
new_options = opts.merge(
|
|
1162
|
+
:operation => :"ComputerUseApi.take_compressed_region_screenshot",
|
|
1163
|
+
:header_params => header_params,
|
|
1164
|
+
:query_params => query_params,
|
|
1165
|
+
:form_params => form_params,
|
|
1166
|
+
:body => post_body,
|
|
1167
|
+
:auth_names => auth_names,
|
|
1168
|
+
:return_type => return_type
|
|
1169
|
+
)
|
|
1170
|
+
|
|
1171
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1172
|
+
if @api_client.config.debugging
|
|
1173
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#take_compressed_region_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1174
|
+
end
|
|
1175
|
+
return data, status_code, headers
|
|
1176
|
+
end
|
|
1177
|
+
|
|
1178
|
+
# Take a compressed screenshot
|
|
1179
|
+
# Take a compressed screenshot of the entire screen
|
|
1180
|
+
# @param [Hash] opts the optional parameters
|
|
1181
|
+
# @option opts [Boolean] :show_cursor Whether to show cursor in screenshot
|
|
1182
|
+
# @option opts [String] :format Image format (png or jpeg)
|
|
1183
|
+
# @option opts [Integer] :quality JPEG quality (1-100)
|
|
1184
|
+
# @option opts [Float] :scale Scale factor (0.1-1.0)
|
|
1185
|
+
# @return [ScreenshotResponse]
|
|
1186
|
+
def take_compressed_screenshot(opts = {})
|
|
1187
|
+
data, _status_code, _headers = take_compressed_screenshot_with_http_info(opts)
|
|
1188
|
+
data
|
|
1189
|
+
end
|
|
1190
|
+
|
|
1191
|
+
# Take a compressed screenshot
|
|
1192
|
+
# Take a compressed screenshot of the entire screen
|
|
1193
|
+
# @param [Hash] opts the optional parameters
|
|
1194
|
+
# @option opts [Boolean] :show_cursor Whether to show cursor in screenshot
|
|
1195
|
+
# @option opts [String] :format Image format (png or jpeg)
|
|
1196
|
+
# @option opts [Integer] :quality JPEG quality (1-100)
|
|
1197
|
+
# @option opts [Float] :scale Scale factor (0.1-1.0)
|
|
1198
|
+
# @return [Array<(ScreenshotResponse, Integer, Hash)>] ScreenshotResponse data, response status code and response headers
|
|
1199
|
+
def take_compressed_screenshot_with_http_info(opts = {})
|
|
1200
|
+
if @api_client.config.debugging
|
|
1201
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.take_compressed_screenshot ...'
|
|
1202
|
+
end
|
|
1203
|
+
# resource path
|
|
1204
|
+
local_var_path = '/computeruse/screenshot/compressed'
|
|
1205
|
+
|
|
1206
|
+
# query parameters
|
|
1207
|
+
query_params = opts[:query_params] || {}
|
|
1208
|
+
query_params[:'showCursor'] = opts[:'show_cursor'] if !opts[:'show_cursor'].nil?
|
|
1209
|
+
query_params[:'format'] = opts[:'format'] if !opts[:'format'].nil?
|
|
1210
|
+
query_params[:'quality'] = opts[:'quality'] if !opts[:'quality'].nil?
|
|
1211
|
+
query_params[:'scale'] = opts[:'scale'] if !opts[:'scale'].nil?
|
|
1212
|
+
|
|
1213
|
+
# header parameters
|
|
1214
|
+
header_params = opts[:header_params] || {}
|
|
1215
|
+
# HTTP header 'Accept' (if needed)
|
|
1216
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1217
|
+
|
|
1218
|
+
# form parameters
|
|
1219
|
+
form_params = opts[:form_params] || {}
|
|
1220
|
+
|
|
1221
|
+
# http body (model)
|
|
1222
|
+
post_body = opts[:debug_body]
|
|
1223
|
+
|
|
1224
|
+
# return_type
|
|
1225
|
+
return_type = opts[:debug_return_type] || 'ScreenshotResponse'
|
|
1226
|
+
|
|
1227
|
+
# auth_names
|
|
1228
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1229
|
+
|
|
1230
|
+
new_options = opts.merge(
|
|
1231
|
+
:operation => :"ComputerUseApi.take_compressed_screenshot",
|
|
1232
|
+
:header_params => header_params,
|
|
1233
|
+
:query_params => query_params,
|
|
1234
|
+
:form_params => form_params,
|
|
1235
|
+
:body => post_body,
|
|
1236
|
+
:auth_names => auth_names,
|
|
1237
|
+
:return_type => return_type
|
|
1238
|
+
)
|
|
1239
|
+
|
|
1240
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1241
|
+
if @api_client.config.debugging
|
|
1242
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#take_compressed_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1243
|
+
end
|
|
1244
|
+
return data, status_code, headers
|
|
1245
|
+
end
|
|
1246
|
+
|
|
1247
|
+
# Take a region screenshot
|
|
1248
|
+
# Take a screenshot of a specific region of the screen
|
|
1249
|
+
# @param x [Integer] X coordinate of the region
|
|
1250
|
+
# @param y [Integer] Y coordinate of the region
|
|
1251
|
+
# @param width [Integer] Width of the region
|
|
1252
|
+
# @param height [Integer] Height of the region
|
|
1253
|
+
# @param [Hash] opts the optional parameters
|
|
1254
|
+
# @option opts [Boolean] :show_cursor Whether to show cursor in screenshot
|
|
1255
|
+
# @return [ScreenshotResponse]
|
|
1256
|
+
def take_region_screenshot(x, y, width, height, opts = {})
|
|
1257
|
+
data, _status_code, _headers = take_region_screenshot_with_http_info(x, y, width, height, opts)
|
|
1258
|
+
data
|
|
1259
|
+
end
|
|
1260
|
+
|
|
1261
|
+
# Take a region screenshot
|
|
1262
|
+
# Take a screenshot of a specific region of the screen
|
|
1263
|
+
# @param x [Integer] X coordinate of the region
|
|
1264
|
+
# @param y [Integer] Y coordinate of the region
|
|
1265
|
+
# @param width [Integer] Width of the region
|
|
1266
|
+
# @param height [Integer] Height of the region
|
|
1267
|
+
# @param [Hash] opts the optional parameters
|
|
1268
|
+
# @option opts [Boolean] :show_cursor Whether to show cursor in screenshot
|
|
1269
|
+
# @return [Array<(ScreenshotResponse, Integer, Hash)>] ScreenshotResponse data, response status code and response headers
|
|
1270
|
+
def take_region_screenshot_with_http_info(x, y, width, height, opts = {})
|
|
1271
|
+
if @api_client.config.debugging
|
|
1272
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.take_region_screenshot ...'
|
|
1273
|
+
end
|
|
1274
|
+
# verify the required parameter 'x' is set
|
|
1275
|
+
if @api_client.config.client_side_validation && x.nil?
|
|
1276
|
+
fail ArgumentError, "Missing the required parameter 'x' when calling ComputerUseApi.take_region_screenshot"
|
|
1277
|
+
end
|
|
1278
|
+
# verify the required parameter 'y' is set
|
|
1279
|
+
if @api_client.config.client_side_validation && y.nil?
|
|
1280
|
+
fail ArgumentError, "Missing the required parameter 'y' when calling ComputerUseApi.take_region_screenshot"
|
|
1281
|
+
end
|
|
1282
|
+
# verify the required parameter 'width' is set
|
|
1283
|
+
if @api_client.config.client_side_validation && width.nil?
|
|
1284
|
+
fail ArgumentError, "Missing the required parameter 'width' when calling ComputerUseApi.take_region_screenshot"
|
|
1285
|
+
end
|
|
1286
|
+
# verify the required parameter 'height' is set
|
|
1287
|
+
if @api_client.config.client_side_validation && height.nil?
|
|
1288
|
+
fail ArgumentError, "Missing the required parameter 'height' when calling ComputerUseApi.take_region_screenshot"
|
|
1289
|
+
end
|
|
1290
|
+
# resource path
|
|
1291
|
+
local_var_path = '/computeruse/screenshot/region'
|
|
1292
|
+
|
|
1293
|
+
# query parameters
|
|
1294
|
+
query_params = opts[:query_params] || {}
|
|
1295
|
+
query_params[:'x'] = x
|
|
1296
|
+
query_params[:'y'] = y
|
|
1297
|
+
query_params[:'width'] = width
|
|
1298
|
+
query_params[:'height'] = height
|
|
1299
|
+
query_params[:'showCursor'] = opts[:'show_cursor'] if !opts[:'show_cursor'].nil?
|
|
1300
|
+
|
|
1301
|
+
# header parameters
|
|
1302
|
+
header_params = opts[:header_params] || {}
|
|
1303
|
+
# HTTP header 'Accept' (if needed)
|
|
1304
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1305
|
+
|
|
1306
|
+
# form parameters
|
|
1307
|
+
form_params = opts[:form_params] || {}
|
|
1308
|
+
|
|
1309
|
+
# http body (model)
|
|
1310
|
+
post_body = opts[:debug_body]
|
|
1311
|
+
|
|
1312
|
+
# return_type
|
|
1313
|
+
return_type = opts[:debug_return_type] || 'ScreenshotResponse'
|
|
1314
|
+
|
|
1315
|
+
# auth_names
|
|
1316
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1317
|
+
|
|
1318
|
+
new_options = opts.merge(
|
|
1319
|
+
:operation => :"ComputerUseApi.take_region_screenshot",
|
|
1320
|
+
:header_params => header_params,
|
|
1321
|
+
:query_params => query_params,
|
|
1322
|
+
:form_params => form_params,
|
|
1323
|
+
:body => post_body,
|
|
1324
|
+
:auth_names => auth_names,
|
|
1325
|
+
:return_type => return_type
|
|
1326
|
+
)
|
|
1327
|
+
|
|
1328
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1329
|
+
if @api_client.config.debugging
|
|
1330
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#take_region_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1331
|
+
end
|
|
1332
|
+
return data, status_code, headers
|
|
1333
|
+
end
|
|
1334
|
+
|
|
1335
|
+
# Take a screenshot
|
|
1336
|
+
# Take a screenshot of the entire screen
|
|
1337
|
+
# @param [Hash] opts the optional parameters
|
|
1338
|
+
# @option opts [Boolean] :show_cursor Whether to show cursor in screenshot
|
|
1339
|
+
# @return [ScreenshotResponse]
|
|
1340
|
+
def take_screenshot(opts = {})
|
|
1341
|
+
data, _status_code, _headers = take_screenshot_with_http_info(opts)
|
|
1342
|
+
data
|
|
1343
|
+
end
|
|
1344
|
+
|
|
1345
|
+
# Take a screenshot
|
|
1346
|
+
# Take a screenshot of the entire screen
|
|
1347
|
+
# @param [Hash] opts the optional parameters
|
|
1348
|
+
# @option opts [Boolean] :show_cursor Whether to show cursor in screenshot
|
|
1349
|
+
# @return [Array<(ScreenshotResponse, Integer, Hash)>] ScreenshotResponse data, response status code and response headers
|
|
1350
|
+
def take_screenshot_with_http_info(opts = {})
|
|
1351
|
+
if @api_client.config.debugging
|
|
1352
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.take_screenshot ...'
|
|
1353
|
+
end
|
|
1354
|
+
# resource path
|
|
1355
|
+
local_var_path = '/computeruse/screenshot'
|
|
1356
|
+
|
|
1357
|
+
# query parameters
|
|
1358
|
+
query_params = opts[:query_params] || {}
|
|
1359
|
+
query_params[:'showCursor'] = opts[:'show_cursor'] if !opts[:'show_cursor'].nil?
|
|
1360
|
+
|
|
1361
|
+
# header parameters
|
|
1362
|
+
header_params = opts[:header_params] || {}
|
|
1363
|
+
# HTTP header 'Accept' (if needed)
|
|
1364
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1365
|
+
|
|
1366
|
+
# form parameters
|
|
1367
|
+
form_params = opts[:form_params] || {}
|
|
1368
|
+
|
|
1369
|
+
# http body (model)
|
|
1370
|
+
post_body = opts[:debug_body]
|
|
1371
|
+
|
|
1372
|
+
# return_type
|
|
1373
|
+
return_type = opts[:debug_return_type] || 'ScreenshotResponse'
|
|
1374
|
+
|
|
1375
|
+
# auth_names
|
|
1376
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1377
|
+
|
|
1378
|
+
new_options = opts.merge(
|
|
1379
|
+
:operation => :"ComputerUseApi.take_screenshot",
|
|
1380
|
+
:header_params => header_params,
|
|
1381
|
+
:query_params => query_params,
|
|
1382
|
+
:form_params => form_params,
|
|
1383
|
+
:body => post_body,
|
|
1384
|
+
:auth_names => auth_names,
|
|
1385
|
+
:return_type => return_type
|
|
1386
|
+
)
|
|
1387
|
+
|
|
1388
|
+
data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
|
|
1389
|
+
if @api_client.config.debugging
|
|
1390
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#take_screenshot\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1391
|
+
end
|
|
1392
|
+
return data, status_code, headers
|
|
1393
|
+
end
|
|
1394
|
+
|
|
1395
|
+
# Type text
|
|
1396
|
+
# Type text with optional delay between keystrokes
|
|
1397
|
+
# @param request [KeyboardTypeRequest] Text typing request
|
|
1398
|
+
# @param [Hash] opts the optional parameters
|
|
1399
|
+
# @return [Object]
|
|
1400
|
+
def type_text(request, opts = {})
|
|
1401
|
+
data, _status_code, _headers = type_text_with_http_info(request, opts)
|
|
1402
|
+
data
|
|
1403
|
+
end
|
|
1404
|
+
|
|
1405
|
+
# Type text
|
|
1406
|
+
# Type text with optional delay between keystrokes
|
|
1407
|
+
# @param request [KeyboardTypeRequest] Text typing request
|
|
1408
|
+
# @param [Hash] opts the optional parameters
|
|
1409
|
+
# @return [Array<(Object, Integer, Hash)>] Object data, response status code and response headers
|
|
1410
|
+
def type_text_with_http_info(request, opts = {})
|
|
1411
|
+
if @api_client.config.debugging
|
|
1412
|
+
@api_client.config.logger.debug 'Calling API: ComputerUseApi.type_text ...'
|
|
1413
|
+
end
|
|
1414
|
+
# verify the required parameter 'request' is set
|
|
1415
|
+
if @api_client.config.client_side_validation && request.nil?
|
|
1416
|
+
fail ArgumentError, "Missing the required parameter 'request' when calling ComputerUseApi.type_text"
|
|
1417
|
+
end
|
|
1418
|
+
# resource path
|
|
1419
|
+
local_var_path = '/computeruse/keyboard/type'
|
|
1420
|
+
|
|
1421
|
+
# query parameters
|
|
1422
|
+
query_params = opts[:query_params] || {}
|
|
1423
|
+
|
|
1424
|
+
# header parameters
|
|
1425
|
+
header_params = opts[:header_params] || {}
|
|
1426
|
+
# HTTP header 'Accept' (if needed)
|
|
1427
|
+
header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
|
|
1428
|
+
# HTTP header 'Content-Type'
|
|
1429
|
+
content_type = @api_client.select_header_content_type(['application/json'])
|
|
1430
|
+
if !content_type.nil?
|
|
1431
|
+
header_params['Content-Type'] = content_type
|
|
1432
|
+
end
|
|
1433
|
+
|
|
1434
|
+
# form parameters
|
|
1435
|
+
form_params = opts[:form_params] || {}
|
|
1436
|
+
|
|
1437
|
+
# http body (model)
|
|
1438
|
+
post_body = opts[:debug_body] || @api_client.object_to_http_body(request)
|
|
1439
|
+
|
|
1440
|
+
# return_type
|
|
1441
|
+
return_type = opts[:debug_return_type] || 'Object'
|
|
1442
|
+
|
|
1443
|
+
# auth_names
|
|
1444
|
+
auth_names = opts[:debug_auth_names] || []
|
|
1445
|
+
|
|
1446
|
+
new_options = opts.merge(
|
|
1447
|
+
:operation => :"ComputerUseApi.type_text",
|
|
1448
|
+
:header_params => header_params,
|
|
1449
|
+
:query_params => query_params,
|
|
1450
|
+
:form_params => form_params,
|
|
1451
|
+
:body => post_body,
|
|
1452
|
+
:auth_names => auth_names,
|
|
1453
|
+
:return_type => return_type
|
|
1454
|
+
)
|
|
1455
|
+
|
|
1456
|
+
data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
|
|
1457
|
+
if @api_client.config.debugging
|
|
1458
|
+
@api_client.config.logger.debug "API called: ComputerUseApi#type_text\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
|
|
1459
|
+
end
|
|
1460
|
+
return data, status_code, headers
|
|
1461
|
+
end
|
|
1462
|
+
end
|
|
1463
|
+
end
|