Class: DaytonaToolboxApiClient::LspApi
- Inherits:
-
Object
- Object
- DaytonaToolboxApiClient::LspApi
- Defined in:
- lib/daytona_toolbox_api_client/api/lsp_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#completions(request, opts = {}) ⇒ CompletionList
Get code completions Get code completion suggestions from the LSP server.
-
#completions_with_http_info(request, opts = {}) ⇒ Array<(CompletionList, Integer, Hash)>
Get code completions Get code completion suggestions from the LSP server.
-
#did_close(request, opts = {}) ⇒ nil
Notify document closed Notify the LSP server that a document has been closed.
-
#did_close_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Notify document closed Notify the LSP server that a document has been closed.
-
#did_open(request, opts = {}) ⇒ nil
Notify document opened Notify the LSP server that a document has been opened.
-
#did_open_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Notify document opened Notify the LSP server that a document has been opened.
-
#document_symbols(language_id, path_to_project, uri, opts = {}) ⇒ Array<LspSymbol>
Get document symbols Get symbols (functions, classes, etc.) from a document.
-
#document_symbols_with_http_info(language_id, path_to_project, uri, opts = {}) ⇒ Array<(Array<LspSymbol>, Integer, Hash)>
Get document symbols Get symbols (functions, classes, etc.) from a document.
-
#initialize(api_client = ApiClient.default) ⇒ LspApi
constructor
A new instance of LspApi.
-
#start(request, opts = {}) ⇒ nil
Start LSP server Start a Language Server Protocol server for the specified language.
-
#start_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Start LSP server Start a Language Server Protocol server for the specified language.
-
#stop(request, opts = {}) ⇒ nil
Stop LSP server Stop a Language Server Protocol server.
-
#stop_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Stop LSP server Stop a Language Server Protocol server.
-
#workspace_symbols(query, language_id, path_to_project, opts = {}) ⇒ Array<LspSymbol>
Get workspace symbols Search for symbols across the entire workspace.
-
#workspace_symbols_with_http_info(query, language_id, path_to_project, opts = {}) ⇒ Array<(Array<LspSymbol>, Integer, Hash)>
Get workspace symbols Search for symbols across the entire workspace.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#completions(request, opts = {}) ⇒ CompletionList
Get code completions Get code completion suggestions from the LSP server
27 28 29 30 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 27 def completions(request, opts = {}) data, _status_code, _headers = completions_with_http_info(request, opts) data end |
#completions_with_http_info(request, opts = {}) ⇒ Array<(CompletionList, Integer, Hash)>
Get code completions Get code completion suggestions from the LSP server
37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 37 def completions_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LspApi.completions ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.completions" end # resource path local_var_path = '/lsp/completions' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request) # return_type return_type = opts[:debug_return_type] || 'CompletionList' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"LspApi.completions", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LspApi#completions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#did_close(request, opts = {}) ⇒ nil
Notify document closed Notify the LSP server that a document has been closed
95 96 97 98 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 95 def did_close(request, opts = {}) did_close_with_http_info(request, opts) nil end |
#did_close_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Notify document closed Notify the LSP server that a document has been closed
105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 105 def did_close_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LspApi.did_close ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.did_close" end # resource path local_var_path = '/lsp/did-close' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"LspApi.did_close", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LspApi#did_close\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#did_open(request, opts = {}) ⇒ nil
Notify document opened Notify the LSP server that a document has been opened
161 162 163 164 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 161 def did_open(request, opts = {}) did_open_with_http_info(request, opts) nil end |
#did_open_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Notify document opened Notify the LSP server that a document has been opened
171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 171 def did_open_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LspApi.did_open ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.did_open" end # resource path local_var_path = '/lsp/did-open' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"LspApi.did_open", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LspApi#did_open\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#document_symbols(language_id, path_to_project, uri, opts = {}) ⇒ Array<LspSymbol>
Get document symbols Get symbols (functions, classes, etc.) from a document
229 230 231 232 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 229 def document_symbols(language_id, path_to_project, uri, opts = {}) data, _status_code, _headers = document_symbols_with_http_info(language_id, path_to_project, uri, opts) data end |
#document_symbols_with_http_info(language_id, path_to_project, uri, opts = {}) ⇒ Array<(Array<LspSymbol>, Integer, Hash)>
Get document symbols Get symbols (functions, classes, etc.) from a document
241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 241 def document_symbols_with_http_info(language_id, path_to_project, uri, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LspApi.document_symbols ...' end # verify the required parameter 'language_id' is set if @api_client.config.client_side_validation && language_id.nil? fail ArgumentError, "Missing the required parameter 'language_id' when calling LspApi.document_symbols" end # verify the required parameter 'path_to_project' is set if @api_client.config.client_side_validation && path_to_project.nil? fail ArgumentError, "Missing the required parameter 'path_to_project' when calling LspApi.document_symbols" end # verify the required parameter 'uri' is set if @api_client.config.client_side_validation && uri.nil? fail ArgumentError, "Missing the required parameter 'uri' when calling LspApi.document_symbols" end # resource path local_var_path = '/lsp/document-symbols' # query parameters query_params = opts[:query_params] || {} query_params[:'languageId'] = language_id query_params[:'pathToProject'] = path_to_project query_params[:'uri'] = uri # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<LspSymbol>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"LspApi.document_symbols", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LspApi#document_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#start(request, opts = {}) ⇒ nil
Start LSP server Start a Language Server Protocol server for the specified language
305 306 307 308 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 305 def start(request, opts = {}) start_with_http_info(request, opts) nil end |
#start_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Start LSP server Start a Language Server Protocol server for the specified language
315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 315 def start_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LspApi.start ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.start" end # resource path local_var_path = '/lsp/start' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"LspApi.start", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LspApi#start\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#stop(request, opts = {}) ⇒ nil
Stop LSP server Stop a Language Server Protocol server
371 372 373 374 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 371 def stop(request, opts = {}) stop_with_http_info(request, opts) nil end |
#stop_with_http_info(request, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Stop LSP server Stop a Language Server Protocol server
381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 381 def stop_with_http_info(request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LspApi.stop ...' end # verify the required parameter 'request' is set if @api_client.config.client_side_validation && request.nil? fail ArgumentError, "Missing the required parameter 'request' when calling LspApi.stop" end # resource path local_var_path = '/lsp/stop' # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # HTTP header 'Content-Type' content_type = @api_client.select_header_content_type(['application/json']) if !content_type.nil? header_params['Content-Type'] = content_type end # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(request) # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"LspApi.stop", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:POST, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LspApi#stop\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#workspace_symbols(query, language_id, path_to_project, opts = {}) ⇒ Array<LspSymbol>
Get workspace symbols Search for symbols across the entire workspace
439 440 441 442 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 439 def workspace_symbols(query, language_id, path_to_project, opts = {}) data, _status_code, _headers = workspace_symbols_with_http_info(query, language_id, path_to_project, opts) data end |
#workspace_symbols_with_http_info(query, language_id, path_to_project, opts = {}) ⇒ Array<(Array<LspSymbol>, Integer, Hash)>
Get workspace symbols Search for symbols across the entire workspace
451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 |
# File 'lib/daytona_toolbox_api_client/api/lsp_api.rb', line 451 def workspace_symbols_with_http_info(query, language_id, path_to_project, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: LspApi.workspace_symbols ...' end # verify the required parameter 'query' is set if @api_client.config.client_side_validation && query.nil? fail ArgumentError, "Missing the required parameter 'query' when calling LspApi.workspace_symbols" end # verify the required parameter 'language_id' is set if @api_client.config.client_side_validation && language_id.nil? fail ArgumentError, "Missing the required parameter 'language_id' when calling LspApi.workspace_symbols" end # verify the required parameter 'path_to_project' is set if @api_client.config.client_side_validation && path_to_project.nil? fail ArgumentError, "Missing the required parameter 'path_to_project' when calling LspApi.workspace_symbols" end # resource path local_var_path = '/lsp/workspacesymbols' # query parameters query_params = opts[:query_params] || {} query_params[:'query'] = query query_params[:'languageId'] = language_id query_params[:'pathToProject'] = path_to_project # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Array<LspSymbol>' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"LspApi.workspace_symbols", :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type ) data, status_code, headers = @api_client.call_api(:GET, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: LspApi#workspace_symbols\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |