Class: CropwisePlatformSdk::TaskApi
- Inherits:
-
Object
- Object
- CropwisePlatformSdk::TaskApi
- Defined in:
- lib/cropwise-platform-sdk/api/task_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#delete_task_by_id(task_id, opts = {}) ⇒ nil
Delete task Delete the specified Task.
-
#delete_task_by_id_with_http_info(task_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete task Delete the specified Task.
-
#delete_task_comment_by_id(comment_id, opts = {}) ⇒ nil
Delete Comment by Id Delete the specified Task Comment.
-
#delete_task_comment_by_id_with_http_info(comment_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Comment by Id Delete the specified Task Comment.
-
#get_task_by_id(task_id, opts = {}) ⇒ Task
Task Details Get Task by Id.
-
#get_task_by_id_with_http_info(task_id, opts = {}) ⇒ Array<(Task, Integer, Hash)>
Task Details Get Task by Id.
-
#get_tasks_by_organization(org_id, opts = {}) ⇒ PagedTask
Get Task By Organization Get the tasks of a specified organization.
-
#get_tasks_by_organization_with_http_info(org_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
Get Task By Organization Get the tasks of a specified organization.
-
#get_tasks_by_property(property_id, opts = {}) ⇒ PagedTask
List property tasks Get the tasks of a specified property.
-
#get_tasks_by_property_extended_search(property_id, include_extended, opts = {}) ⇒ PagedTask
List property tasks with filtered extra_attribute Get the tasks of a specified property.
-
#get_tasks_by_property_extended_search_with_http_info(property_id, include_extended, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
List property tasks with filtered extra_attribute Get the tasks of a specified property.
-
#get_tasks_by_property_with_http_info(property_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
List property tasks Get the tasks of a specified property.
-
#get_v2_tasks_categories(opts = {}) ⇒ PagedTaskCategory
Get Task Categories Retrieve Task Categories.
-
#get_v2_tasks_categories_with_http_info(opts = {}) ⇒ Array<(PagedTaskCategory, Integer, Hash)>
Get Task Categories Retrieve Task Categories.
-
#get_v2_tasks_status(opts = {}) ⇒ PagedTaskStatus
Get Task Status Retrieve Task Status.
-
#get_v2_tasks_status_with_http_info(opts = {}) ⇒ Array<(PagedTaskStatus, Integer, Hash)>
Get Task Status Retrieve Task Status.
-
#initialize(api_client = ApiClient.default) ⇒ TaskApi
constructor
A new instance of TaskApi.
-
#post_v2_tasks(opts = {}) ⇒ Task
Task Creator Create Task.
-
#post_v2_tasks_task_id_comments(task_id, opts = {}) ⇒ TaskComment
Post comment into Task Create Task comment by Task Id.
-
#post_v2_tasks_task_id_comments_with_http_info(task_id, opts = {}) ⇒ Array<(TaskComment, Integer, Hash)>
Post comment into Task Create Task comment by Task Id.
-
#post_v2_tasks_task_id_progress(task_id, opts = {}) ⇒ ProgressLogDrilldown
Post Progress into Task Create Task Progress by Task Id.
-
#post_v2_tasks_task_id_progress_with_http_info(task_id, opts = {}) ⇒ Array<(ProgressLogDrilldown, Integer, Hash)>
Post Progress into Task Create Task Progress by Task Id.
-
#post_v2_tasks_with_http_info(opts = {}) ⇒ Array<(Task, Integer, Hash)>
Task Creator Create Task.
-
#update_v2_tasks(task_id, opts = {}) ⇒ Task
Task Update Update task by task-id.
-
#update_v2_tasks_comment(comment_id, opts = {}) ⇒ TaskComment
Comment Update Update task by task-id.
-
#update_v2_tasks_comment_with_http_info(comment_id, opts = {}) ⇒ Array<(TaskComment, Integer, Hash)>
Comment Update Update task by task-id.
-
#update_v2_tasks_with_http_info(task_id, opts = {}) ⇒ Array<(Task, Integer, Hash)>
Task Update Update task by task-id.
-
#v2_orgs_org_id_tasks_get(org_id, opts = {}) ⇒ PagedTask
Get task by organization.
-
#v2_orgs_org_id_tasks_get_with_http_info(org_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
Get task by organization.
Constructor Details
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
17 18 19 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 17 def api_client @api_client end |
Instance Method Details
#delete_task_by_id(task_id, opts = {}) ⇒ nil
Delete task Delete the specified Task.
27 28 29 30 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 27 def delete_task_by_id(task_id, opts = {}) delete_task_by_id_with_http_info(task_id, opts) nil end |
#delete_task_by_id_with_http_info(task_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete task Delete the specified Task.
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/cropwise-platform-sdk/api/task_api.rb', line 37 def delete_task_by_id_with_http_info(task_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.delete_task_by_id ...' end # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? fail ArgumentError, "Missing the required parameter 'task_id' when calling TaskApi.delete_task_by_id" end # resource path local_var_path = '/v2/tasks/{task_id}'.sub('{' + 'task_id' + '}', CGI.escape(task_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # 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] || [] = opts.merge( :operation => :"TaskApi.delete_task_by_id", :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: TaskApi#delete_task_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#delete_task_comment_by_id(comment_id, opts = {}) ⇒ nil
Delete Comment by Id Delete the specified Task Comment.
88 89 90 91 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 88 def delete_task_comment_by_id(comment_id, opts = {}) delete_task_comment_by_id_with_http_info(comment_id, opts) nil end |
#delete_task_comment_by_id_with_http_info(comment_id, opts = {}) ⇒ Array<(nil, Integer, Hash)>
Delete Comment by Id Delete the specified Task Comment.
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 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 98 def delete_task_comment_by_id_with_http_info(comment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.delete_task_comment_by_id ...' end # verify the required parameter 'comment_id' is set if @api_client.config.client_side_validation && comment_id.nil? fail ArgumentError, "Missing the required parameter 'comment_id' when calling TaskApi.delete_task_comment_by_id" end # resource path local_var_path = '/v2/tasks/comments/{comment_id}'.sub('{' + 'comment_id' + '}', CGI.escape(comment_id.to_s)) # query parameters query_params = opts[:query_params] || {} # header parameters header_params = opts[:header_params] || {} # 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] || [] = opts.merge( :operation => :"TaskApi.delete_task_comment_by_id", :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: TaskApi#delete_task_comment_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_task_by_id(task_id, opts = {}) ⇒ Task
Task Details Get Task by Id
149 150 151 152 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 149 def get_task_by_id(task_id, opts = {}) data, _status_code, _headers = get_task_by_id_with_http_info(task_id, opts) data end |
#get_task_by_id_with_http_info(task_id, opts = {}) ⇒ Array<(Task, Integer, Hash)>
Task Details Get Task by Id
159 160 161 162 163 164 165 166 167 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 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 159 def get_task_by_id_with_http_info(task_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.get_task_by_id ...' end # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? fail ArgumentError, "Missing the required parameter 'task_id' when calling TaskApi.get_task_by_id" end # resource path local_var_path = '/v2/tasks/{task_id}'.sub('{' + 'task_id' + '}', CGI.escape(task_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']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'Task' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.get_task_by_id", :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: TaskApi#get_task_by_id\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_tasks_by_organization(org_id, opts = {}) ⇒ PagedTask
Get Task By Organization Get the tasks of a specified organization
215 216 217 218 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 215 def get_tasks_by_organization(org_id, opts = {}) data, _status_code, _headers = get_tasks_by_organization_with_http_info(org_id, opts) data end |
#get_tasks_by_organization_with_http_info(org_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
Get Task By Organization Get the tasks of a specified organization
228 229 230 231 232 233 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 281 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 228 def get_tasks_by_organization_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.get_tasks_by_organization ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling TaskApi.get_tasks_by_organization" end # resource path local_var_path = '/v2/orgs/{org_id}/tasks'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # 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(opts[:'task_filters']) # return_type return_type = opts[:debug_return_type] || 'PagedTask' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.get_tasks_by_organization", :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: TaskApi#get_tasks_by_organization\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_tasks_by_property(property_id, opts = {}) ⇒ PagedTask
List property tasks Get the tasks of a specified property
295 296 297 298 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 295 def get_tasks_by_property(property_id, opts = {}) data, _status_code, _headers = get_tasks_by_property_with_http_info(property_id, opts) data end |
#get_tasks_by_property_extended_search(property_id, include_extended, opts = {}) ⇒ PagedTask
List property tasks with filtered extra_attribute Get the tasks of a specified property
386 387 388 389 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 386 def get_tasks_by_property_extended_search(property_id, include_extended, opts = {}) data, _status_code, _headers = get_tasks_by_property_extended_search_with_http_info(property_id, include_extended, opts) data end |
#get_tasks_by_property_extended_search_with_http_info(property_id, include_extended, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
List property tasks with filtered extra_attribute Get the tasks of a specified property
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 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 464 465 466 467 468 469 470 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 406 def get_tasks_by_property_extended_search_with_http_info(property_id, include_extended, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.get_tasks_by_property_extended_search ...' end # verify the required parameter 'property_id' is set if @api_client.config.client_side_validation && property_id.nil? fail ArgumentError, "Missing the required parameter 'property_id' when calling TaskApi.get_tasks_by_property_extended_search" end # verify the required parameter 'include_extended' is set if @api_client.config.client_side_validation && include_extended.nil? fail ArgumentError, "Missing the required parameter 'include_extended' when calling TaskApi.get_tasks_by_property_extended_search" end allowable_values = ["geometry"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/properties/{property_id}/tasks/extended-search'.sub('{' + 'property_id' + '}', CGI.escape(property_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'include_extended'] = include_extended query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'season_id'] = opts[:'season_id'] if !opts[:'season_id'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].nil? query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :csv) if !opts[:'tags'].nil? query_params[:'extra_attribute'] = opts[:'extra_attribute'] if !opts[:'extra_attribute'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) header_params[:'client-id'] = opts[:'client_id'] if !opts[:'client_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedTask' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.get_tasks_by_property_extended_search", :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: TaskApi#get_tasks_by_property_extended_search\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_tasks_by_property_with_http_info(property_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
List property tasks Get the tasks of a specified property
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 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 312 def get_tasks_by_property_with_http_info(property_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.get_tasks_by_property ...' end # verify the required parameter 'property_id' is set if @api_client.config.client_side_validation && property_id.nil? fail ArgumentError, "Missing the required parameter 'property_id' when calling TaskApi.get_tasks_by_property" end allowable_values = ["geometry"] if @api_client.config.client_side_validation && opts[:'attributes'] && !opts[:'attributes'].all? { |item| allowable_values.include?(item) } fail ArgumentError, "invalid value for \"attributes\", must include one of #{allowable_values}" end # resource path local_var_path = '/v2/properties/{property_id}/tasks'.sub('{' + 'property_id' + '}', CGI.escape(property_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'season_id'] = opts[:'season_id'] if !opts[:'season_id'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'attributes'] = @api_client.build_collection_param(opts[:'attributes'], :csv) if !opts[:'attributes'].nil? query_params[:'tags'] = @api_client.build_collection_param(opts[:'tags'], :csv) if !opts[:'tags'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedTask' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.get_tasks_by_property", :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: TaskApi#get_tasks_by_property\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_v2_tasks_categories(opts = {}) ⇒ PagedTaskCategory
Get Task Categories Retrieve Task Categories
478 479 480 481 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 478 def get_v2_tasks_categories(opts = {}) data, _status_code, _headers = get_v2_tasks_categories_with_http_info(opts) data end |
#get_v2_tasks_categories_with_http_info(opts = {}) ⇒ Array<(PagedTaskCategory, Integer, Hash)>
Get Task Categories Retrieve Task Categories
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 525 526 527 528 529 530 531 532 533 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 489 def get_v2_tasks_categories_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.get_v2_tasks_categories ...' end # resource path local_var_path = '/v2/tasks/categories' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedTaskCategory' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.get_v2_tasks_categories", :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: TaskApi#get_v2_tasks_categories\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#get_v2_tasks_status(opts = {}) ⇒ PagedTaskStatus
Get Task Status Retrieve Task Status
541 542 543 544 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 541 def get_v2_tasks_status(opts = {}) data, _status_code, _headers = get_v2_tasks_status_with_http_info(opts) data end |
#get_v2_tasks_status_with_http_info(opts = {}) ⇒ Array<(PagedTaskStatus, Integer, Hash)>
Get Task Status Retrieve Task Status
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/cropwise-platform-sdk/api/task_api.rb', line 552 def get_v2_tasks_status_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.get_v2_tasks_status ...' end # resource path local_var_path = '/v2/tasks/status' # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedTaskStatus' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.get_v2_tasks_status", :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: TaskApi#get_v2_tasks_status\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_v2_tasks(opts = {}) ⇒ Task
Task Creator Create Task
604 605 606 607 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 604 def post_v2_tasks(opts = {}) data, _status_code, _headers = post_v2_tasks_with_http_info(opts) data end |
#post_v2_tasks_task_id_comments(task_id, opts = {}) ⇒ TaskComment
Post comment into Task Create Task comment by Task Id
671 672 673 674 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 671 def post_v2_tasks_task_id_comments(task_id, opts = {}) data, _status_code, _headers = post_v2_tasks_task_id_comments_with_http_info(task_id, opts) data end |
#post_v2_tasks_task_id_comments_with_http_info(task_id, opts = {}) ⇒ Array<(TaskComment, Integer, Hash)>
Post comment into Task Create Task comment by Task Id
682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 682 def post_v2_tasks_task_id_comments_with_http_info(task_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.post_v2_tasks_task_id_comments ...' end # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? fail ArgumentError, "Missing the required parameter 'task_id' when calling TaskApi.post_v2_tasks_task_id_comments" end # resource path local_var_path = '/v2/tasks/{task_id}/comments'.sub('{' + 'task_id' + '}', CGI.escape(task_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']) # 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(opts[:'basic_task_comment']) # return_type return_type = opts[:debug_return_type] || 'TaskComment' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.post_v2_tasks_task_id_comments", :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: TaskApi#post_v2_tasks_task_id_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_v2_tasks_task_id_progress(task_id, opts = {}) ⇒ ProgressLogDrilldown
Post Progress into Task Create Task Progress by Task Id
741 742 743 744 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 741 def post_v2_tasks_task_id_progress(task_id, opts = {}) data, _status_code, _headers = post_v2_tasks_task_id_progress_with_http_info(task_id, opts) data end |
#post_v2_tasks_task_id_progress_with_http_info(task_id, opts = {}) ⇒ Array<(ProgressLogDrilldown, Integer, Hash)>
Post Progress into Task Create Task Progress by Task Id
752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 752 def post_v2_tasks_task_id_progress_with_http_info(task_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.post_v2_tasks_task_id_progress ...' end # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? fail ArgumentError, "Missing the required parameter 'task_id' when calling TaskApi.post_v2_tasks_task_id_progress" end # resource path local_var_path = '/v2/tasks/{task_id}/progress'.sub('{' + 'task_id' + '}', CGI.escape(task_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']) # 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(opts[:'progress_log_drilldown']) # return_type return_type = opts[:debug_return_type] || 'ProgressLogDrilldown' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.post_v2_tasks_task_id_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: TaskApi#post_v2_tasks_task_id_progress\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#post_v2_tasks_with_http_info(opts = {}) ⇒ Array<(Task, Integer, Hash)>
Task Creator Create Task
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 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 615 def post_v2_tasks_with_http_info(opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.post_v2_tasks ...' end # resource path local_var_path = '/v2/tasks' # 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']) # 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 header_params[:'client-id'] = opts[:'client_id'] if !opts[:'client_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'task']) # return_type return_type = opts[:debug_return_type] || 'Task' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.post_v2_tasks", :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: TaskApi#post_v2_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_v2_tasks(task_id, opts = {}) ⇒ Task
Task Update Update task by task-id
812 813 814 815 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 812 def update_v2_tasks(task_id, opts = {}) data, _status_code, _headers = update_v2_tasks_with_http_info(task_id, opts) data end |
#update_v2_tasks_comment(comment_id, opts = {}) ⇒ TaskComment
Comment Update Update task by task-id
884 885 886 887 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 884 def update_v2_tasks_comment(comment_id, opts = {}) data, _status_code, _headers = update_v2_tasks_comment_with_http_info(comment_id, opts) data end |
#update_v2_tasks_comment_with_http_info(comment_id, opts = {}) ⇒ Array<(TaskComment, Integer, Hash)>
Comment Update Update task by task-id
895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 895 def update_v2_tasks_comment_with_http_info(comment_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.update_v2_tasks_comment ...' end # verify the required parameter 'comment_id' is set if @api_client.config.client_side_validation && comment_id.nil? fail ArgumentError, "Missing the required parameter 'comment_id' when calling TaskApi.update_v2_tasks_comment" end # resource path local_var_path = '/v2/tasks/comments/{comment_id}'.sub('{' + 'comment_id' + '}', CGI.escape(comment_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']) # 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(opts[:'basic_task_comment']) # return_type return_type = opts[:debug_return_type] || 'TaskComment' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.update_v2_tasks_comment", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TaskApi#update_v2_tasks_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#update_v2_tasks_with_http_info(task_id, opts = {}) ⇒ Array<(Task, Integer, Hash)>
Task Update Update task by task-id
824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 824 def update_v2_tasks_with_http_info(task_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.update_v2_tasks ...' end # verify the required parameter 'task_id' is set if @api_client.config.client_side_validation && task_id.nil? fail ArgumentError, "Missing the required parameter 'task_id' when calling TaskApi.update_v2_tasks" end # resource path local_var_path = '/v2/tasks/{task_id}'.sub('{' + 'task_id' + '}', CGI.escape(task_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']) # 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 header_params[:'client-id'] = opts[:'client_id'] if !opts[:'client_id'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'task']) # return_type return_type = opts[:debug_return_type] || 'Task' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.update_v2_tasks", :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(:PUT, local_var_path, ) if @api_client.config.debugging @api_client.config.logger.debug "API called: TaskApi#update_v2_tasks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#v2_orgs_org_id_tasks_get(org_id, opts = {}) ⇒ PagedTask
Get task by organization
959 960 961 962 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 959 def v2_orgs_org_id_tasks_get(org_id, opts = {}) data, _status_code, _headers = v2_orgs_org_id_tasks_get_with_http_info(org_id, opts) data end |
#v2_orgs_org_id_tasks_get_with_http_info(org_id, opts = {}) ⇒ Array<(PagedTask, Integer, Hash)>
Get task by organization
975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008 1009 1010 1011 1012 1013 1014 1015 1016 1017 1018 1019 1020 1021 1022 1023 1024 1025 1026 1027 1028 |
# File 'lib/cropwise-platform-sdk/api/task_api.rb', line 975 def v2_orgs_org_id_tasks_get_with_http_info(org_id, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: TaskApi.v2_orgs_org_id_tasks_get ...' end # verify the required parameter 'org_id' is set if @api_client.config.client_side_validation && org_id.nil? fail ArgumentError, "Missing the required parameter 'org_id' when calling TaskApi.v2_orgs_org_id_tasks_get" end # resource path local_var_path = '/v2/orgs/{org_id}/tasks'.sub('{' + 'org_id' + '}', CGI.escape(org_id.to_s)) # query parameters query_params = opts[:query_params] || {} query_params[:'page'] = opts[:'page'] if !opts[:'page'].nil? query_params[:'size'] = opts[:'size'] if !opts[:'size'].nil? query_params[:'season_id'] = opts[:'season_id'] if !opts[:'season_id'].nil? query_params[:'since'] = opts[:'since'] if !opts[:'since'].nil? query_params[:'until'] = opts[:'_until'] if !opts[:'_until'].nil? query_params[:'property_id'] = opts[:'property_id'] if !opts[:'property_id'].nil? query_params[:'deleted'] = opts[:'deleted'] if !opts[:'deleted'].nil? # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:debug_body] # return_type return_type = opts[:debug_return_type] || 'PagedTask' # auth_names auth_names = opts[:debug_auth_names] || [] = opts.merge( :operation => :"TaskApi.v2_orgs_org_id_tasks_get", :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: TaskApi#v2_orgs_org_id_tasks_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |