Class: Spatio::RoutinesApi
- Inherits:
-
Object
- Object
- Spatio::RoutinesApi
- Defined in:
- lib/spatio-sdk/api/routines_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#claim_routine_run(id, opts = {}) ⇒ RoutineRun
Worker claims a queued run.
-
#claim_routine_run_with_http_info(id, opts = {}) ⇒ Array<(RoutineRun, Integer, Hash)>
Worker claims a queued run.
-
#complete_routine_run(id, routine_run_complete_request, opts = {}) ⇒ RoutineRun
Worker marks a run complete.
-
#complete_routine_run_with_http_info(id, routine_run_complete_request, opts = {}) ⇒ Array<(RoutineRun, Integer, Hash)>
Worker marks a run complete.
-
#create_routine(create_routine_request, opts = {}) ⇒ Routine
Create a routine.
-
#create_routine_with_http_info(create_routine_request, opts = {}) ⇒ Array<(Routine, Integer, Hash)>
Create a routine.
-
#delete_routine(id, opts = {}) ⇒ nil
Delete a routine.
-
#delete_routine_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a routine.
-
#get_routine(id, opts = {}) ⇒ Routine
Fetch a routine.
-
#get_routine_with_http_info(id, opts = {}) ⇒ Array<(Routine, Integer, Hash)>
Fetch a routine.
-
#initialize(api_client = ApiClient.default) ⇒ RoutinesApi
constructor
A new instance of RoutinesApi.
-
#list_routine_runs(id, opts = {}) ⇒ RoutineRunListResponse
List runs for a routine.
-
#list_routine_runs_with_http_info(id, opts = {}) ⇒ Array<(RoutineRunListResponse, Integer, Hash)>
List runs for a routine.
-
#list_routines(opts = {}) ⇒ RoutineListResponse
List routines for the caller’s workspace.
-
#list_routines_with_http_info(opts = {}) ⇒ Array<(RoutineListResponse, Integer, Hash)>
List routines for the caller's workspace.
-
#run_routine_now(id, opts = {}) ⇒ RoutineRun
Trigger an ad-hoc run.
-
#run_routine_now_with_http_info(id, opts = {}) ⇒ Array<(RoutineRun, Integer, Hash)>
Trigger an ad-hoc run.
-
#update_routine(id, update_routine_request, opts = {}) ⇒ Routine
Update a routine.
-
#update_routine_run_progress(id, routine_run_progress_request, opts = {}) ⇒ RoutineRun
Worker reports progress.
-
#update_routine_run_progress_with_http_info(id, routine_run_progress_request, opts = {}) ⇒ Array<(RoutineRun, Integer, Hash)>
Worker reports progress.
-
#update_routine_with_http_info(id, update_routine_request, opts = {}) ⇒ Array<(Routine, Integer, Hash)>
Update a routine.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ RoutinesApi
Returns a new instance of RoutinesApi.
19 20 21 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 19 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#claim_routine_run(id, opts = {}) ⇒ RoutineRun
Worker claims a queued run.
26 27 28 29 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 26 def claim_routine_run(id, opts = {}) data, _status_code, _headers = claim_routine_run_with_http_info(id, opts) data end |
#claim_routine_run_with_http_info(id, opts = {}) ⇒ Array<(RoutineRun, Integer, Hash)>
Worker claims a queued run.
35 36 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 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 35 def claim_routine_run_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.claim_routine_run ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RoutinesApi.claim_routine_run" end # resource path local_var_path = '/v1/routines/runs/{id}/claim'.sub('{id}', CGI.escape(id.to_s)) # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RoutineRun' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.claim_routine_run", :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: RoutinesApi#claim_routine_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#complete_routine_run(id, routine_run_complete_request, opts = {}) ⇒ RoutineRun
Worker marks a run complete.
88 89 90 91 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 88 def complete_routine_run(id, routine_run_complete_request, opts = {}) data, _status_code, _headers = complete_routine_run_with_http_info(id, routine_run_complete_request, opts) data end |
#complete_routine_run_with_http_info(id, routine_run_complete_request, opts = {}) ⇒ Array<(RoutineRun, Integer, Hash)>
Worker marks a run complete.
98 99 100 101 102 103 104 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 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 98 def complete_routine_run_with_http_info(id, routine_run_complete_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.complete_routine_run ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RoutinesApi.complete_routine_run" end # verify the required parameter 'routine_run_complete_request' is set if @api_client.config.client_side_validation && routine_run_complete_request.nil? fail ArgumentError, "Missing the required parameter 'routine_run_complete_request' when calling RoutinesApi.complete_routine_run" end # resource path local_var_path = '/v1/routines/runs/{id}/complete'.sub('{id}', CGI.escape(id.to_s)) # 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(routine_run_complete_request) # return_type return_type = opts[:debug_return_type] || 'RoutineRun' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.complete_routine_run", :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: RoutinesApi#complete_routine_run\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#create_routine(create_routine_request, opts = {}) ⇒ Routine
Create a routine.
159 160 161 162 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 159 def create_routine(create_routine_request, opts = {}) data, _status_code, _headers = create_routine_with_http_info(create_routine_request, opts) data end |
#create_routine_with_http_info(create_routine_request, opts = {}) ⇒ Array<(Routine, Integer, Hash)>
Create a routine.
168 169 170 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 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 168 def create_routine_with_http_info(create_routine_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.create_routine ...' end # verify the required parameter 'create_routine_request' is set if @api_client.config.client_side_validation && create_routine_request.nil? fail ArgumentError, "Missing the required parameter 'create_routine_request' when calling RoutinesApi.create_routine" end # resource path local_var_path = '/v1/routines' # 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(create_routine_request) # return_type return_type = opts[:debug_return_type] || 'Routine' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.create_routine", :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: RoutinesApi#create_routine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_routine(id, opts = {}) ⇒ nil
Delete a routine.
225 226 227 228 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 225 def delete_routine(id, opts = {}) delete_routine_with_http_info(id, opts) nil end |
#delete_routine_with_http_info(id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete a routine.
234 235 236 237 238 239 240 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 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 234 def delete_routine_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.delete_routine ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RoutinesApi.delete_routine" end # resource path local_var_path = '/v1/routines/{id}'.sub('{id}', CGI.escape(id.to_s)) # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.delete_routine", :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(:DELETE, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutinesApi#delete_routine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_routine(id, opts = {}) ⇒ Routine
Fetch a routine.
286 287 288 289 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 286 def get_routine(id, opts = {}) data, _status_code, _headers = get_routine_with_http_info(id, opts) data end |
#get_routine_with_http_info(id, opts = {}) ⇒ Array<(Routine, Integer, Hash)>
Fetch a routine.
295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 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 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 295 def get_routine_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.get_routine ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RoutinesApi.get_routine" end # resource path local_var_path = '/v1/routines/{id}'.sub('{id}', CGI.escape(id.to_s)) # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Routine' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.get_routine", :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: RoutinesApi#get_routine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_routine_runs(id, opts = {}) ⇒ RoutineRunListResponse
List runs for a routine.
347 348 349 350 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 347 def list_routine_runs(id, opts = {}) data, _status_code, _headers = list_routine_runs_with_http_info(id, opts) data end |
#list_routine_runs_with_http_info(id, opts = {}) ⇒ Array<(RoutineRunListResponse, Integer, Hash)>
List runs for a routine.
356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 356 def list_routine_runs_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.list_routine_runs ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RoutinesApi.list_routine_runs" end # resource path local_var_path = '/v1/routines/{id}/runs'.sub('{id}', CGI.escape(id.to_s)) # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RoutineRunListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.list_routine_runs", :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: RoutinesApi#list_routine_runs\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#list_routines(opts = {}) ⇒ RoutineListResponse
List routines for the caller’s workspace.
409 410 411 412 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 409 def list_routines(opts = {}) data, _status_code, _headers = list_routines_with_http_info(opts) data end |
#list_routines_with_http_info(opts = {}) ⇒ Array<(RoutineListResponse, Integer, Hash)>
List routines for the caller's workspace.
419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 419 def list_routines_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.list_routines ...' end # resource path local_var_path = '/v1/routines' # query parameters query_params = opts[:query_params] || {} query_params[:'workspaceId'] = opts[:'workspace_id'] if !opts[:'workspace_id'].nil? query_params[:'status'] = opts[:'status'] if !opts[:'status'].nil? # 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] || 'RoutineListResponse' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.list_routines", :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: RoutinesApi#list_routines\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#run_routine_now(id, opts = {}) ⇒ RoutineRun
Trigger an ad-hoc run.
469 470 471 472 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 469 def run_routine_now(id, opts = {}) data, _status_code, _headers = run_routine_now_with_http_info(id, opts) data end |
#run_routine_now_with_http_info(id, opts = {}) ⇒ Array<(RoutineRun, Integer, Hash)>
Trigger an ad-hoc run.
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 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 478 def run_routine_now_with_http_info(id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.run_routine_now ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RoutinesApi.run_routine_now" end # resource path local_var_path = '/v1/routines/{id}/run-now'.sub('{id}', CGI.escape(id.to_s)) # 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'] # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'RoutineRun' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.run_routine_now", :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: RoutinesApi#run_routine_now\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_routine(id, update_routine_request, opts = {}) ⇒ Routine
Update a routine.
531 532 533 534 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 531 def update_routine(id, update_routine_request, opts = {}) data, _status_code, _headers = update_routine_with_http_info(id, update_routine_request, opts) data end |
#update_routine_run_progress(id, routine_run_progress_request, opts = {}) ⇒ RoutineRun
Worker reports progress.
603 604 605 606 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 603 def update_routine_run_progress(id, routine_run_progress_request, opts = {}) data, _status_code, _headers = update_routine_run_progress_with_http_info(id, routine_run_progress_request, opts) data end |
#update_routine_run_progress_with_http_info(id, routine_run_progress_request, opts = {}) ⇒ Array<(RoutineRun, Integer, Hash)>
Worker reports progress.
613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 613 def update_routine_run_progress_with_http_info(id, routine_run_progress_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.update_routine_run_progress ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RoutinesApi.update_routine_run_progress" end # verify the required parameter 'routine_run_progress_request' is set if @api_client.config.client_side_validation && routine_run_progress_request.nil? fail ArgumentError, "Missing the required parameter 'routine_run_progress_request' when calling RoutinesApi.update_routine_run_progress" end # resource path local_var_path = '/v1/routines/runs/{id}/progress'.sub('{id}', CGI.escape(id.to_s)) # 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(routine_run_progress_request) # return_type return_type = opts[:debug_return_type] || 'RoutineRun' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.update_routine_run_progress", :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: RoutinesApi#update_routine_run_progress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_routine_with_http_info(id, update_routine_request, opts = {}) ⇒ Array<(Routine, Integer, Hash)>
Update a routine.
541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 |
# File 'lib/spatio-sdk/api/routines_api.rb', line 541 def update_routine_with_http_info(id, update_routine_request, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: RoutinesApi.update_routine ...' end # verify the required parameter 'id' is set if @api_client.config.client_side_validation && id.nil? fail ArgumentError, "Missing the required parameter 'id' when calling RoutinesApi.update_routine" end # verify the required parameter 'update_routine_request' is set if @api_client.config.client_side_validation && update_routine_request.nil? fail ArgumentError, "Missing the required parameter 'update_routine_request' when calling RoutinesApi.update_routine" end # resource path local_var_path = '/v1/routines/{id}'.sub('{id}', CGI.escape(id.to_s)) # 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(update_routine_request) # return_type return_type = opts[:debug_return_type] || 'Routine' # auth_names auth_names = opts[:debug_auth_names] || ['bearerAuth'] = opts.merge( :operation => :"RoutinesApi.update_routine", :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(:PATCH, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: RoutinesApi#update_routine\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |