Class: IndexeaClient::WidgetsApi
- Inherits:
-
Object
- Object
- IndexeaClient::WidgetsApi
- Defined in:
- lib/indexea_client/api/widgets_api.rb
Instance Attribute Summary collapse
-
#api_client ⇒ Object
Returns the value of attribute api_client.
Instance Method Summary collapse
-
#initialize(api_client = ApiClient.default) ⇒ WidgetsApi
constructor
A new instance of WidgetsApi.
-
#widget_copy(app, widget, opts = {}) ⇒ WidgetBean
复制指定组件并创建新组件.
-
#widget_copy_to_widget(app, widget, to, opts = {}) ⇒ BOOLEAN
复制组件到已有组件.
-
#widget_copy_to_widget_with_http_info(app, widget, to, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
复制组件到已有组件.
-
#widget_copy_with_http_info(app, widget, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
复制指定组件并创建新组件.
-
#widget_create(body, app, opts = {}) ⇒ WidgetBean
创建组件.
-
#widget_create_with_http_info(body, app, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
创建组件.
-
#widget_delete(app, widget, opts = {}) ⇒ BOOLEAN
删除组件.
-
#widget_delete_with_http_info(app, widget, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除组件.
-
#widget_detail(ident, opts = {}) ⇒ WidgetBean
获取UI组件的所有相关信息.
-
#widget_detail_with_http_info(ident, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
获取UI组件的所有相关信息.
-
#widget_download(app, widget, framework, opts = {}) ⇒ String
下载组件应用源码.
-
#widget_download_with_http_info(app, widget, framework, opts = {}) ⇒ Array<(String, Integer, Hash)>
下载组件应用源码.
-
#widget_get(app, widget, opts = {}) ⇒ WidgetBean
获取组件的详情.
-
#widget_get_with_http_info(app, widget, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
获取组件的详情.
-
#widget_list(app, opts = {}) ⇒ Array<WidgetBean>
获取应用的组件列表.
-
#widget_list_with_http_info(app, opts = {}) ⇒ Array<(Array<WidgetBean>, Integer, Hash)>
获取应用的组件列表.
-
#widget_logo(app, widget, opts = {}) ⇒ WidgetLogo
设置组件 Logo.
-
#widget_logo_with_http_info(app, widget, opts = {}) ⇒ Array<(WidgetLogo, Integer, Hash)>
设置组件 Logo.
-
#widget_update(body, app, widget, opts = {}) ⇒ WidgetBean
修改组件.
-
#widget_update_settings(key, type, value, vcode, app, widget, opts = {}) ⇒ BOOLEAN
修改组件设置参数.
-
#widget_update_settings_with_http_info(key, type, value, vcode, app, widget, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
修改组件设置参数.
-
#widget_update_with_http_info(body, app, widget, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
修改组件.
Constructor Details
#initialize(api_client = ApiClient.default) ⇒ WidgetsApi
Returns a new instance of WidgetsApi.
16 17 18 |
# File 'lib/indexea_client/api/widgets_api.rb', line 16 def initialize(api_client = ApiClient.default) @api_client = api_client end |
Instance Attribute Details
#api_client ⇒ Object
Returns the value of attribute api_client.
14 15 16 |
# File 'lib/indexea_client/api/widgets_api.rb', line 14 def api_client @api_client end |
Instance Method Details
#widget_copy(app, widget, opts = {}) ⇒ WidgetBean
复制指定组件并创建新组件
24 25 26 27 |
# File 'lib/indexea_client/api/widgets_api.rb', line 24 def (app, , opts = {}) data, _status_code, _headers = (app, , opts) data end |
#widget_copy_to_widget(app, widget, to, opts = {}) ⇒ BOOLEAN
复制组件到已有组件
86 87 88 89 |
# File 'lib/indexea_client/api/widgets_api.rb', line 86 def (app, , to, opts = {}) data, _status_code, _headers = (app, , to, opts) data end |
#widget_copy_to_widget_with_http_info(app, widget, to, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
复制组件到已有组件
97 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 |
# File 'lib/indexea_client/api/widgets_api.rb', line 97 def (app, , to, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_copy_to_widget ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_copy_to_widget" end # verify the required parameter 'widget' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_copy_to_widget" end # verify the required parameter 'to' is set if @api_client.config.client_side_validation && to.nil? fail ArgumentError, "Missing the required parameter 'to' when calling WidgetsApi.widget_copy_to_widget" end # resource path local_var_path = '/widget/{app}/copy'.sub('{' + 'app' + '}', app.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'widget'] = query_params[:'to'] = to # 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[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_copy_to_widget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_copy_with_http_info(app, widget, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
复制指定组件并创建新组件
34 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 |
# File 'lib/indexea_client/api/widgets_api.rb', line 34 def (app, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_copy ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_copy" end # verify the required parameter 'widget' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_copy" end # resource path local_var_path = '/widget/{app}/copy'.sub('{' + 'app' + '}', app.to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'widget'] = # 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[:body] return_type = opts[:return_type] || 'WidgetBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_copy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_create(body, app, opts = {}) ⇒ WidgetBean
创建组件
153 154 155 156 |
# File 'lib/indexea_client/api/widgets_api.rb', line 153 def (body, app, opts = {}) data, _status_code, _headers = (body, app, opts) data end |
#widget_create_with_http_info(body, app, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
创建组件
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 206 207 208 209 |
# File 'lib/indexea_client/api/widgets_api.rb', line 163 def (body, app, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_create ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling WidgetsApi.widget_create" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_create" end # resource path local_var_path = '/widgets/{app}'.sub('{' + 'app' + '}', app.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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'WidgetBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_delete(app, widget, opts = {}) ⇒ BOOLEAN
删除组件
216 217 218 219 |
# File 'lib/indexea_client/api/widgets_api.rb', line 216 def (app, , opts = {}) data, _status_code, _headers = (app, , opts) data end |
#widget_delete_with_http_info(app, widget, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
删除组件
227 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 |
# File 'lib/indexea_client/api/widgets_api.rb', line 227 def (app, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_delete ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_delete" end # verify the required parameter 'widget' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_delete" end # resource path local_var_path = '/widgets/{app}/{widget}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', .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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['password'] = opts[:'password'] if !opts[:'password'].nil? # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_detail(ident, opts = {}) ⇒ WidgetBean
获取UI组件的所有相关信息
280 281 282 283 |
# File 'lib/indexea_client/api/widgets_api.rb', line 280 def (ident, opts = {}) data, _status_code, _headers = (ident, opts) data end |
#widget_detail_with_http_info(ident, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
获取UI组件的所有相关信息
290 291 292 293 294 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 |
# File 'lib/indexea_client/api/widgets_api.rb', line 290 def (ident, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_detail ...' end # verify the required parameter 'ident' is set if @api_client.config.client_side_validation && ident.nil? fail ArgumentError, "Missing the required parameter 'ident' when calling WidgetsApi.widget_detail" end # resource path local_var_path = '/widget/{ident}'.sub('{' + 'ident' + '}', ident.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']) header_params[:'x-token'] = opts[:'x_token'] if !opts[:'x_token'].nil? # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'WidgetBean' auth_names = opts[:auth_names] || [] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_download(app, widget, framework, opts = {}) ⇒ String
下载组件应用源码
338 339 340 341 |
# File 'lib/indexea_client/api/widgets_api.rb', line 338 def (app, , framework, opts = {}) data, _status_code, _headers = (app, , framework, opts) data end |
#widget_download_with_http_info(app, widget, framework, opts = {}) ⇒ Array<(String, Integer, Hash)>
下载组件应用源码
349 350 351 352 353 354 355 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 |
# File 'lib/indexea_client/api/widgets_api.rb', line 349 def (app, , framework, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_download ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_download" end # verify the required parameter 'widget' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_download" end # verify the required parameter 'framework' is set if @api_client.config.client_side_validation && framework.nil? fail ArgumentError, "Missing the required parameter 'framework' when calling WidgetsApi.widget_download" end # resource path local_var_path = '/widgets/{app}/{widget}/download'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', .to_s) # query parameters query_params = opts[:query_params] || {} query_params[:'framework'] = framework # header parameters header_params = opts[:header_params] || {} # HTTP header 'Accept' (if needed) header_params['Accept'] = @api_client.select_header_accept(['default']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'String' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_get(app, widget, opts = {}) ⇒ WidgetBean
获取组件的详情
404 405 406 407 |
# File 'lib/indexea_client/api/widgets_api.rb', line 404 def (app, , opts = {}) data, _status_code, _headers = (app, , opts) data end |
#widget_get_with_http_info(app, widget, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
获取组件的详情
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 |
# File 'lib/indexea_client/api/widgets_api.rb', line 414 def (app, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_get ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_get" end # verify the required parameter 'widget' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_get" end # resource path local_var_path = '/widgets/{app}/{widget}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', .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[:body] return_type = opts[:return_type] || 'WidgetBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_list(app, opts = {}) ⇒ Array<WidgetBean>
获取应用的组件列表
463 464 465 466 |
# File 'lib/indexea_client/api/widgets_api.rb', line 463 def (app, opts = {}) data, _status_code, _headers = (app, opts) data end |
#widget_list_with_http_info(app, opts = {}) ⇒ Array<(Array<WidgetBean>, Integer, Hash)>
获取应用的组件列表
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 509 510 511 512 |
# File 'lib/indexea_client/api/widgets_api.rb', line 472 def (app, opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_list ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_list" end # resource path local_var_path = '/widgets/{app}'.sub('{' + 'app' + '}', app.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[:body] return_type = opts[:return_type] || 'Array<WidgetBean>' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:GET, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_logo(app, widget, opts = {}) ⇒ WidgetLogo
设置组件 Logo
519 520 521 522 |
# File 'lib/indexea_client/api/widgets_api.rb', line 519 def (app, , opts = {}) data, _status_code, _headers = (app, , opts) data end |
#widget_logo_with_http_info(app, widget, opts = {}) ⇒ Array<(WidgetLogo, Integer, Hash)>
设置组件 Logo
530 531 532 533 534 535 536 537 538 539 540 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 |
# File 'lib/indexea_client/api/widgets_api.rb', line 530 def (app, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_logo ...' end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_logo" end # verify the required parameter 'widget' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_logo" end # resource path local_var_path = '/widgets/{app}/{widget}/logo'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', .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' header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data']) # form parameters form_params = opts[:form_params] || {} form_params['logo'] = opts[:'logo'] if !opts[:'logo'].nil? # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'WidgetLogo' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:POST, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_update(body, app, widget, opts = {}) ⇒ WidgetBean
修改组件
584 585 586 587 |
# File 'lib/indexea_client/api/widgets_api.rb', line 584 def (body, app, , opts = {}) data, _status_code, _headers = (body, app, , opts) data end |
#widget_update_settings(key, type, value, vcode, app, widget, opts = {}) ⇒ BOOLEAN
修改组件设置参数
655 656 657 658 |
# File 'lib/indexea_client/api/widgets_api.rb', line 655 def (key, type, value, vcode, app, , opts = {}) data, _status_code, _headers = (key, type, value, vcode, app, , opts) data end |
#widget_update_settings_with_http_info(key, type, value, vcode, app, widget, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>
修改组件设置参数
669 670 671 672 673 674 675 676 677 678 679 680 681 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 734 735 736 737 738 739 |
# File 'lib/indexea_client/api/widgets_api.rb', line 669 def (key, type, value, vcode, app, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_update_settings ...' end # verify the required parameter 'key' is set if @api_client.config.client_side_validation && key.nil? fail ArgumentError, "Missing the required parameter 'key' when calling WidgetsApi.widget_update_settings" end # verify the required parameter 'type' is set if @api_client.config.client_side_validation && type.nil? fail ArgumentError, "Missing the required parameter 'type' when calling WidgetsApi.widget_update_settings" end # verify enum value if @api_client.config.client_side_validation && !['int', 'bool', 'string'].include?(type) fail ArgumentError, "invalid value for 'type', must be one of int, bool, string" end # verify the required parameter 'value' is set if @api_client.config.client_side_validation && value.nil? fail ArgumentError, "Missing the required parameter 'value' when calling WidgetsApi.widget_update_settings" end # verify the required parameter 'vcode' is set if @api_client.config.client_side_validation && vcode.nil? fail ArgumentError, "Missing the required parameter 'vcode' when calling WidgetsApi.widget_update_settings" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_update_settings" end # verify the required parameter 'widget' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_update_settings" end # resource path local_var_path = '/widgets/{app}/{widget}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', .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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded']) # form parameters form_params = opts[:form_params] || {} form_params['key'] = key form_params['type'] = type form_params['value'] = value form_params['vcode'] = vcode # http body (model) post_body = opts[:body] return_type = opts[:return_type] || 'BOOLEAN' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PATCH, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |
#widget_update_with_http_info(body, app, widget, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>
修改组件
595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 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 |
# File 'lib/indexea_client/api/widgets_api.rb', line 595 def (body, app, , opts = {}) if @api_client.config.debugging @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_update ...' end # verify the required parameter 'body' is set if @api_client.config.client_side_validation && body.nil? fail ArgumentError, "Missing the required parameter 'body' when calling WidgetsApi.widget_update" end # verify the required parameter 'app' is set if @api_client.config.client_side_validation && app.nil? fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_update" end # verify the required parameter 'widget' is set if @api_client.config.client_side_validation && .nil? fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_update" end # resource path local_var_path = '/widgets/{app}/{widget}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', .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' header_params['Content-Type'] = @api_client.select_header_content_type(['application/json']) # form parameters form_params = opts[:form_params] || {} # http body (model) post_body = opts[:body] || @api_client.object_to_http_body(body) return_type = opts[:return_type] || 'WidgetBean' auth_names = opts[:auth_names] || ['TokenAuth'] data, status_code, headers = @api_client.call_api(:PUT, local_var_path, :header_params => header_params, :query_params => query_params, :form_params => form_params, :body => post_body, :auth_names => auth_names, :return_type => return_type) if @api_client.config.debugging @api_client.config.logger.debug "API called: WidgetsApi#widget_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}" end return data, status_code, headers end |