Class: IndexeaClient::WidgetsApi

Inherits:
Object
  • Object
show all
Defined in:
lib/indexea_client/api/widgets_api.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

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_clientObject

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

复制指定组件并创建新组件

Parameters:

  • app

    应用标识

  • widget

    源组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



24
25
26
27
# File 'lib/indexea_client/api/widgets_api.rb', line 24

def widget_copy(app, widget, opts = {})
  data, _status_code, _headers = widget_copy_with_http_info(app, widget, opts)
  data
end

#widget_copy_to_widget(app, widget, to, opts = {}) ⇒ BOOLEAN

复制组件到已有组件

Parameters:

  • app

    应用标识

  • widget

    源组件编号

  • to

    目标组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (BOOLEAN)


86
87
88
89
# File 'lib/indexea_client/api/widgets_api.rb', line 86

def widget_copy_to_widget(app, widget, to, opts = {})
  data, _status_code, _headers = widget_copy_to_widget_with_http_info(app, widget, to, opts)
  data
end

#widget_copy_to_widget_with_http_info(app, widget, to, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>

复制组件到已有组件

Parameters:

  • app

    应用标识

  • widget

    源组件编号

  • to

    目标组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BOOLEAN, Integer, Hash)>)

    BOOLEAN data, response status code and response headers



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 widget_copy_to_widget_with_http_info(app, widget, 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 && widget.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'] = 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)>

复制指定组件并创建新组件

Parameters:

  • app

    应用标识

  • widget

    源组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WidgetBean, Integer, Hash)>)

    WidgetBean data, response status code and response headers



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 widget_copy_with_http_info(app, widget, 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 && widget.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'] = 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

创建组件

Parameters:

  • body
  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



153
154
155
156
# File 'lib/indexea_client/api/widgets_api.rb', line 153

def widget_create(body, app, opts = {})
  data, _status_code, _headers = widget_create_with_http_info(body, app, opts)
  data
end

#widget_create_with_http_info(body, app, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>

创建组件

Parameters:

  • body
  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WidgetBean, Integer, Hash)>)

    WidgetBean data, response status code and response headers



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 widget_create_with_http_info(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

删除组件

Parameters:

  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :password (String)

Returns:

  • (BOOLEAN)


216
217
218
219
# File 'lib/indexea_client/api/widgets_api.rb', line 216

def widget_delete(app, widget, opts = {})
  data, _status_code, _headers = widget_delete_with_http_info(app, widget, opts)
  data
end

#widget_delete_with_http_info(app, widget, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>

删除组件

Parameters:

  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :password (String)

Returns:

  • (Array<(BOOLEAN, Integer, Hash)>)

    BOOLEAN data, response status code and response headers



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 widget_delete_with_http_info(app, widget, 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 && widget.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' + '}', 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组件的所有相关信息

Parameters:

  • ident

    UI组件的唯一标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_token (String)

    如果要使用非发布的组件,需要组件作者授权

Returns:



280
281
282
283
# File 'lib/indexea_client/api/widgets_api.rb', line 280

def widget_detail(ident, opts = {})
  data, _status_code, _headers = widget_detail_with_http_info(ident, opts)
  data
end

#widget_detail_with_http_info(ident, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>

获取UI组件的所有相关信息

Parameters:

  • ident

    UI组件的唯一标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :x_token (String)

    如果要使用非发布的组件,需要组件作者授权

Returns:

  • (Array<(WidgetBean, Integer, Hash)>)

    WidgetBean data, response status code and response headers



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 widget_detail_with_http_info(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

下载组件应用源码

Parameters:

  • app

    应用标识

  • widget

    组件编号

  • framework

    指定的技术框架

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (String)


338
339
340
341
# File 'lib/indexea_client/api/widgets_api.rb', line 338

def widget_download(app, widget, framework, opts = {})
  data, _status_code, _headers = widget_download_with_http_info(app, widget, framework, opts)
  data
end

#widget_download_with_http_info(app, widget, framework, opts = {}) ⇒ Array<(String, Integer, Hash)>

下载组件应用源码

Parameters:

  • app

    应用标识

  • widget

    组件编号

  • framework

    指定的技术框架

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(String, Integer, Hash)>)

    String data, response status code and response headers



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 widget_download_with_http_info(app, widget, 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 && widget.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' + '}', 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

获取组件的详情

Parameters:

  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



404
405
406
407
# File 'lib/indexea_client/api/widgets_api.rb', line 404

def widget_get(app, widget, opts = {})
  data, _status_code, _headers = widget_get_with_http_info(app, widget, opts)
  data
end

#widget_get_with_http_info(app, widget, opts = {}) ⇒ Array<(WidgetBean, Integer, Hash)>

获取组件的详情

Parameters:

  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WidgetBean, Integer, Hash)>)

    WidgetBean data, response status code and response headers



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 widget_get_with_http_info(app, widget, 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 && widget.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' + '}', 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>

获取应用的组件列表

Parameters:

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



463
464
465
466
# File 'lib/indexea_client/api/widgets_api.rb', line 463

def widget_list(app, opts = {})
  data, _status_code, _headers = widget_list_with_http_info(app, opts)
  data
end

#widget_list_with_http_info(app, opts = {}) ⇒ Array<(Array<WidgetBean>, Integer, Hash)>

获取应用的组件列表

Parameters:

  • app

    应用标识

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(Array<WidgetBean>, Integer, Hash)>)

    Array<WidgetBean> data, response status code and response headers



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 widget_list_with_http_info(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

Parameters:

  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :logo (String)

Returns:



519
520
521
522
# File 'lib/indexea_client/api/widgets_api.rb', line 519

def (app, widget, opts = {})
  data, _status_code, _headers = widget_logo_with_http_info(app, widget, opts)
  data
end

#widget_logo_with_http_info(app, widget, opts = {}) ⇒ Array<(WidgetLogo, Integer, Hash)>

设置组件 Logo

Parameters:

  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Options Hash (opts):

  • :logo (String)

Returns:

  • (Array<(WidgetLogo, Integer, Hash)>)

    WidgetLogo data, response status code and response headers



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 widget_logo_with_http_info(app, widget, 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 && widget.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' + '}', 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

修改组件

Parameters:

  • body
  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:



584
585
586
587
# File 'lib/indexea_client/api/widgets_api.rb', line 584

def widget_update(body, app, widget, opts = {})
  data, _status_code, _headers = widget_update_with_http_info(body, app, widget, opts)
  data
end

#widget_update_settings(key, type, value, vcode, app, widget, opts = {}) ⇒ BOOLEAN

修改组件设置参数

Parameters:

  • key
  • type
  • value
  • vcode
  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (BOOLEAN)


655
656
657
658
# File 'lib/indexea_client/api/widgets_api.rb', line 655

def widget_update_settings(key, type, value, vcode, app, widget, opts = {})
  data, _status_code, _headers = widget_update_settings_with_http_info(key, type, value, vcode, app, widget, opts)
  data
end

#widget_update_settings_with_http_info(key, type, value, vcode, app, widget, opts = {}) ⇒ Array<(BOOLEAN, Integer, Hash)>

修改组件设置参数

Parameters:

  • key
  • type
  • value
  • vcode
  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(BOOLEAN, Integer, Hash)>)

    BOOLEAN data, response status code and response headers



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 widget_update_settings_with_http_info(key, type, value, vcode, app, widget, 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 && widget.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' + '}', 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)>

修改组件

Parameters:

  • body
  • app

    应用标识

  • widget

    组件编号

  • opts (Hash) (defaults to: {})

    the optional parameters

Returns:

  • (Array<(WidgetBean, Integer, Hash)>)

    WidgetBean data, response status code and response headers



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 widget_update_with_http_info(body, app, widget, 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 && widget.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' + '}', 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