indexea_client 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (301) hide show
  1. checksums.yaml +7 -0
  2. data/Gemfile +9 -0
  3. data/README.md +3413 -0
  4. data/Rakefile +8 -0
  5. data/docs/AccountApi.md +685 -0
  6. data/docs/AccountBean.md +27 -0
  7. data/docs/AccountPasswdBody.md +8 -0
  8. data/docs/AccountPortraitBody.md +7 -0
  9. data/docs/AccountProfileBody.md +8 -0
  10. data/docs/AccountResetpwdBody.md +9 -0
  11. data/docs/AccountSigninBody.md +9 -0
  12. data/docs/AccountSignupBody.md +10 -0
  13. data/docs/AccountsFeedbackBody.md +8 -0
  14. data/docs/AccountsMessageBody.md +8 -0
  15. data/docs/AnalyzeObject.md +8 -0
  16. data/docs/AnalyzeToken.md +11 -0
  17. data/docs/AppBean.md +23 -0
  18. data/docs/AppCompanyBody.md +22 -0
  19. data/docs/AppIndexBody.md +7 -0
  20. data/docs/AppLogAccount.md +9 -0
  21. data/docs/AppLogBean.md +19 -0
  22. data/docs/AppLogsBean.md +9 -0
  23. data/docs/AppMentorBean.md +14 -0
  24. data/docs/AppOauthBody.md +7 -0
  25. data/docs/AppOauthBody1.md +7 -0
  26. data/docs/AppOauthresetsecretBody.md +7 -0
  27. data/docs/AppTokensBody.md +7 -0
  28. data/docs/AppTokensBody1.md +7 -0
  29. data/docs/AppWidgetBody.md +7 -0
  30. data/docs/AppsApi.md +1843 -0
  31. data/docs/AppsAppBody.md +8 -0
  32. data/docs/AppsBody.md +8 -0
  33. data/docs/AutoCompleteItem.md +9 -0
  34. data/docs/BlacklistBean.md +12 -0
  35. data/docs/Bulletin.md +15 -0
  36. data/docs/CompanyBean.md +24 -0
  37. data/docs/ContactForm.md +11 -0
  38. data/docs/CrawlerLog.md +14 -0
  39. data/docs/CrawlerLogs.md +8 -0
  40. data/docs/CrawlerTask.md +16 -0
  41. data/docs/FieldsApi.md +215 -0
  42. data/docs/GlobalApi.md +258 -0
  43. data/docs/GlobalOptionForm.md +8 -0
  44. data/docs/IndexBean.md +26 -0
  45. data/docs/IndexFieldBean.md +8 -0
  46. data/docs/IndexForm.md +15 -0
  47. data/docs/IndexRebuildForm.md +12 -0
  48. data/docs/IndexSettings.md +10 -0
  49. data/docs/IndexSettingsBody.md +7 -0
  50. data/docs/IndexStatBean.md +14 -0
  51. data/docs/IndexSynonymsflushBody.md +7 -0
  52. data/docs/IndexTask.md +13 -0
  53. data/docs/IndexTemplate.md +17 -0
  54. data/docs/IndexTemplates.md +8 -0
  55. data/docs/IndexUploadBody.md +7 -0
  56. data/docs/IndicesApi.md +1620 -0
  57. data/docs/IntelligentMapping.md +8 -0
  58. data/docs/KeywordBindingBean.md +14 -0
  59. data/docs/MentorForm.md +8 -0
  60. data/docs/Message.md +18 -0
  61. data/docs/MessageApi.md +262 -0
  62. data/docs/Messages.md +8 -0
  63. data/docs/OauthAppBean.md +20 -0
  64. data/docs/OpenidBean.md +10 -0
  65. data/docs/OptionForm.md +10 -0
  66. data/docs/OrdersIdentBody.md +7 -0
  67. data/docs/PayResult.md +9 -0
  68. data/docs/PaymentApi.md +788 -0
  69. data/docs/PaymentInvoice.md +15 -0
  70. data/docs/PaymentOrder.md +25 -0
  71. data/docs/PaymentRecord.md +13 -0
  72. data/docs/PaymentService.md +12 -0
  73. data/docs/QueriesApi.md +1821 -0
  74. data/docs/QueryActionBean.md +27 -0
  75. data/docs/QueryBean.md +22 -0
  76. data/docs/QueryForm.md +15 -0
  77. data/docs/QueryNode.md +10 -0
  78. data/docs/QuerySortField.md +9 -0
  79. data/docs/QueryVariableBean.md +17 -0
  80. data/docs/RecommendApi.md +365 -0
  81. data/docs/RecommendBean.md +18 -0
  82. data/docs/RecordFilter.md +10 -0
  83. data/docs/RecordsApi.md +286 -0
  84. data/docs/SearchApi.md +646 -0
  85. data/docs/SearchEstimateResult.md +11 -0
  86. data/docs/SearchWord.md +8 -0
  87. data/docs/StatIndexBean.md +14 -0
  88. data/docs/StatsApi.md +245 -0
  89. data/docs/SynonymsBean.md +14 -0
  90. data/docs/TokenBean.md +12 -0
  91. data/docs/TriggerBean.md +13 -0
  92. data/docs/TriggerLogBean.md +15 -0
  93. data/docs/ValueOfField.md +8 -0
  94. data/docs/WidgetBean.md +21 -0
  95. data/docs/WidgetForm.md +13 -0
  96. data/docs/WidgetLogo.md +7 -0
  97. data/docs/WidgetLogoBody.md +7 -0
  98. data/docs/WidgetStatusForm.md +8 -0
  99. data/docs/WidgetsApi.md +573 -0
  100. data/git_push.sh +55 -0
  101. data/indexea_client.gemspec +38 -0
  102. data/lib/indexea_client/api/account_api.rb +846 -0
  103. data/lib/indexea_client/api/apps_api.rb +2271 -0
  104. data/lib/indexea_client/api/fields_api.rb +289 -0
  105. data/lib/indexea_client/api/global_api.rb +326 -0
  106. data/lib/indexea_client/api/indices_api.rb +2076 -0
  107. data/lib/indexea_client/api/message_api.rb +337 -0
  108. data/lib/indexea_client/api/payment_api.rb +975 -0
  109. data/lib/indexea_client/api/queries_api.rb +2320 -0
  110. data/lib/indexea_client/api/recommend_api.rb +461 -0
  111. data/lib/indexea_client/api/records_api.rb +375 -0
  112. data/lib/indexea_client/api/search_api.rb +892 -0
  113. data/lib/indexea_client/api/stats_api.rb +312 -0
  114. data/lib/indexea_client/api/widgets_api.rb +741 -0
  115. data/lib/indexea_client/api_client.rb +391 -0
  116. data/lib/indexea_client/api_error.rb +57 -0
  117. data/lib/indexea_client/configuration.rb +205 -0
  118. data/lib/indexea_client/models/account_bean.rb +396 -0
  119. data/lib/indexea_client/models/account_passwd_body.rb +227 -0
  120. data/lib/indexea_client/models/account_portrait_body.rb +206 -0
  121. data/lib/indexea_client/models/account_profile_body.rb +228 -0
  122. data/lib/indexea_client/models/account_resetpwd_body.rb +240 -0
  123. data/lib/indexea_client/models/account_signin_body.rb +237 -0
  124. data/lib/indexea_client/models/account_signup_body.rb +254 -0
  125. data/lib/indexea_client/models/accounts_feedback_body.rb +262 -0
  126. data/lib/indexea_client/models/accounts_message_body.rb +226 -0
  127. data/lib/indexea_client/models/analyze_object.rb +216 -0
  128. data/lib/indexea_client/models/analyze_token.rb +243 -0
  129. data/lib/indexea_client/models/app_bean.rb +360 -0
  130. data/lib/indexea_client/models/app_company_body.rb +357 -0
  131. data/lib/indexea_client/models/app_index_body.rb +212 -0
  132. data/lib/indexea_client/models/app_log_account.rb +224 -0
  133. data/lib/indexea_client/models/app_log_bean.rb +318 -0
  134. data/lib/indexea_client/models/app_logs_bean.rb +229 -0
  135. data/lib/indexea_client/models/app_mentor_bean.rb +277 -0
  136. data/lib/indexea_client/models/app_oauth_body.rb +206 -0
  137. data/lib/indexea_client/models/app_oauth_body_1.rb +212 -0
  138. data/lib/indexea_client/models/app_oauthresetsecret_body.rb +212 -0
  139. data/lib/indexea_client/models/app_tokens_body.rb +212 -0
  140. data/lib/indexea_client/models/app_tokens_body_1.rb +212 -0
  141. data/lib/indexea_client/models/app_widget_body.rb +212 -0
  142. data/lib/indexea_client/models/apps_app_body.rb +216 -0
  143. data/lib/indexea_client/models/apps_body.rb +221 -0
  144. data/lib/indexea_client/models/auto_complete_item.rb +224 -0
  145. data/lib/indexea_client/models/blacklist_bean.rb +258 -0
  146. data/lib/indexea_client/models/bulletin.rb +312 -0
  147. data/lib/indexea_client/models/company_bean.rb +378 -0
  148. data/lib/indexea_client/models/contact_form.rb +258 -0
  149. data/lib/indexea_client/models/crawler_log.rb +270 -0
  150. data/lib/indexea_client/models/crawler_logs.rb +217 -0
  151. data/lib/indexea_client/models/crawler_task.rb +288 -0
  152. data/lib/indexea_client/models/global_option_form.rb +218 -0
  153. data/lib/indexea_client/models/index_bean.rb +390 -0
  154. data/lib/indexea_client/models/index_field_bean.rb +217 -0
  155. data/lib/indexea_client/models/index_form.rb +283 -0
  156. data/lib/indexea_client/models/index_rebuild_form.rb +254 -0
  157. data/lib/indexea_client/models/index_settings.rb +234 -0
  158. data/lib/indexea_client/models/index_settings_body.rb +212 -0
  159. data/lib/indexea_client/models/index_stat_bean.rb +270 -0
  160. data/lib/indexea_client/models/index_synonymsflush_body.rb +212 -0
  161. data/lib/indexea_client/models/index_task.rb +261 -0
  162. data/lib/indexea_client/models/index_template.rb +299 -0
  163. data/lib/indexea_client/models/index_templates.rb +219 -0
  164. data/lib/indexea_client/models/index_upload_body.rb +208 -0
  165. data/lib/indexea_client/models/intelligent_mapping.rb +217 -0
  166. data/lib/indexea_client/models/keyword_binding_bean.rb +274 -0
  167. data/lib/indexea_client/models/mentor_form.rb +220 -0
  168. data/lib/indexea_client/models/message.rb +306 -0
  169. data/lib/indexea_client/models/messages.rb +217 -0
  170. data/lib/indexea_client/models/oauth_app_bean.rb +329 -0
  171. data/lib/indexea_client/models/openid_bean.rb +238 -0
  172. data/lib/indexea_client/models/option_form.rb +287 -0
  173. data/lib/indexea_client/models/orders_ident_body.rb +206 -0
  174. data/lib/indexea_client/models/pay_result.rb +258 -0
  175. data/lib/indexea_client/models/payment_invoice.rb +283 -0
  176. data/lib/indexea_client/models/payment_order.rb +412 -0
  177. data/lib/indexea_client/models/payment_record.rb +261 -0
  178. data/lib/indexea_client/models/payment_service.rb +258 -0
  179. data/lib/indexea_client/models/query_action_bean.rb +391 -0
  180. data/lib/indexea_client/models/query_bean.rb +348 -0
  181. data/lib/indexea_client/models/query_form.rb +285 -0
  182. data/lib/indexea_client/models/query_node.rb +234 -0
  183. data/lib/indexea_client/models/query_sort_field.rb +264 -0
  184. data/lib/indexea_client/models/query_variable_bean.rb +335 -0
  185. data/lib/indexea_client/models/recommend_bean.rb +318 -0
  186. data/lib/indexea_client/models/record_filter.rb +242 -0
  187. data/lib/indexea_client/models/search_estimate_result.rb +242 -0
  188. data/lib/indexea_client/models/search_word.rb +218 -0
  189. data/lib/indexea_client/models/stat_index_bean.rb +270 -0
  190. data/lib/indexea_client/models/synonyms_bean.rb +274 -0
  191. data/lib/indexea_client/models/token_bean.rb +252 -0
  192. data/lib/indexea_client/models/trigger_bean.rb +263 -0
  193. data/lib/indexea_client/models/trigger_log_bean.rb +279 -0
  194. data/lib/indexea_client/models/value_of_field.rb +217 -0
  195. data/lib/indexea_client/models/widget_bean.rb +387 -0
  196. data/lib/indexea_client/models/widget_form.rb +328 -0
  197. data/lib/indexea_client/models/widget_logo.rb +206 -0
  198. data/lib/indexea_client/models/widget_logo_body.rb +206 -0
  199. data/lib/indexea_client/models/widget_status_form.rb +223 -0
  200. data/lib/indexea_client/version.rb +14 -0
  201. data/lib/indexea_client.rb +133 -0
  202. data/spec/api/account_api_spec.rb +200 -0
  203. data/spec/api/apps_api_spec.rb +492 -0
  204. data/spec/api/fields_api_spec.rb +86 -0
  205. data/spec/api/global_api_spec.rb +98 -0
  206. data/spec/api/indices_api_spec.rb +434 -0
  207. data/spec/api/message_api_spec.rb +96 -0
  208. data/spec/api/payment_api_spec.rb +227 -0
  209. data/spec/api/queries_api_spec.rb +482 -0
  210. data/spec/api/recommend_api_spec.rb +125 -0
  211. data/spec/api/records_api_spec.rb +107 -0
  212. data/spec/api/search_api_spec.rb +220 -0
  213. data/spec/api/stats_api_spec.rb +99 -0
  214. data/spec/api/widgets_api_spec.rb +174 -0
  215. data/spec/api_client_spec.rb +225 -0
  216. data/spec/base_object_spec.rb +109 -0
  217. data/spec/configuration_spec.rb +41 -0
  218. data/spec/models/account_bean_spec.rb +160 -0
  219. data/spec/models/account_passwd_body_spec.rb +46 -0
  220. data/spec/models/account_portrait_body_spec.rb +40 -0
  221. data/spec/models/account_profile_body_spec.rb +46 -0
  222. data/spec/models/account_resetpwd_body_spec.rb +52 -0
  223. data/spec/models/account_signin_body_spec.rb +52 -0
  224. data/spec/models/account_signup_body_spec.rb +58 -0
  225. data/spec/models/accounts_feedback_body_spec.rb +50 -0
  226. data/spec/models/accounts_message_body_spec.rb +46 -0
  227. data/spec/models/analyze_object_spec.rb +46 -0
  228. data/spec/models/analyze_token_spec.rb +64 -0
  229. data/spec/models/app_bean_spec.rb +136 -0
  230. data/spec/models/app_company_body_spec.rb +130 -0
  231. data/spec/models/app_index_body_spec.rb +40 -0
  232. data/spec/models/app_log_account_spec.rb +52 -0
  233. data/spec/models/app_log_bean_spec.rb +112 -0
  234. data/spec/models/app_logs_bean_spec.rb +52 -0
  235. data/spec/models/app_mentor_bean_spec.rb +82 -0
  236. data/spec/models/app_oauth_body_1_spec.rb +40 -0
  237. data/spec/models/app_oauth_body_spec.rb +40 -0
  238. data/spec/models/app_oauthresetsecret_body_spec.rb +40 -0
  239. data/spec/models/app_tokens_body_1_spec.rb +40 -0
  240. data/spec/models/app_tokens_body_spec.rb +40 -0
  241. data/spec/models/app_widget_body_spec.rb +40 -0
  242. data/spec/models/apps_app_body_spec.rb +46 -0
  243. data/spec/models/apps_body_spec.rb +46 -0
  244. data/spec/models/auto_complete_item_spec.rb +52 -0
  245. data/spec/models/blacklist_bean_spec.rb +70 -0
  246. data/spec/models/bulletin_spec.rb +92 -0
  247. data/spec/models/company_bean_spec.rb +142 -0
  248. data/spec/models/contact_form_spec.rb +64 -0
  249. data/spec/models/crawler_log_spec.rb +82 -0
  250. data/spec/models/crawler_logs_spec.rb +46 -0
  251. data/spec/models/crawler_task_spec.rb +94 -0
  252. data/spec/models/global_option_form_spec.rb +46 -0
  253. data/spec/models/index_bean_spec.rb +154 -0
  254. data/spec/models/index_field_bean_spec.rb +46 -0
  255. data/spec/models/index_form_spec.rb +88 -0
  256. data/spec/models/index_rebuild_form_spec.rb +70 -0
  257. data/spec/models/index_settings_body_spec.rb +40 -0
  258. data/spec/models/index_settings_spec.rb +58 -0
  259. data/spec/models/index_stat_bean_spec.rb +82 -0
  260. data/spec/models/index_synonymsflush_body_spec.rb +40 -0
  261. data/spec/models/index_task_spec.rb +76 -0
  262. data/spec/models/index_template_spec.rb +100 -0
  263. data/spec/models/index_templates_spec.rb +46 -0
  264. data/spec/models/index_upload_body_spec.rb +40 -0
  265. data/spec/models/intelligent_mapping_spec.rb +46 -0
  266. data/spec/models/keyword_binding_bean_spec.rb +82 -0
  267. data/spec/models/mentor_form_spec.rb +46 -0
  268. data/spec/models/message_spec.rb +106 -0
  269. data/spec/models/messages_spec.rb +46 -0
  270. data/spec/models/oauth_app_bean_spec.rb +118 -0
  271. data/spec/models/openid_bean_spec.rb +58 -0
  272. data/spec/models/option_form_spec.rb +62 -0
  273. data/spec/models/orders_ident_body_spec.rb +40 -0
  274. data/spec/models/pay_result_spec.rb +56 -0
  275. data/spec/models/payment_invoice_spec.rb +88 -0
  276. data/spec/models/payment_order_spec.rb +152 -0
  277. data/spec/models/payment_record_spec.rb +76 -0
  278. data/spec/models/payment_service_spec.rb +70 -0
  279. data/spec/models/query_action_bean_spec.rb +160 -0
  280. data/spec/models/query_bean_spec.rb +130 -0
  281. data/spec/models/query_form_spec.rb +88 -0
  282. data/spec/models/query_node_spec.rb +58 -0
  283. data/spec/models/query_sort_field_spec.rb +56 -0
  284. data/spec/models/query_variable_bean_spec.rb +104 -0
  285. data/spec/models/recommend_bean_spec.rb +106 -0
  286. data/spec/models/record_filter_spec.rb +58 -0
  287. data/spec/models/search_estimate_result_spec.rb +64 -0
  288. data/spec/models/search_word_spec.rb +46 -0
  289. data/spec/models/stat_index_bean_spec.rb +82 -0
  290. data/spec/models/synonyms_bean_spec.rb +82 -0
  291. data/spec/models/token_bean_spec.rb +70 -0
  292. data/spec/models/trigger_bean_spec.rb +76 -0
  293. data/spec/models/trigger_log_bean_spec.rb +88 -0
  294. data/spec/models/value_of_field_spec.rb +46 -0
  295. data/spec/models/widget_bean_spec.rb +132 -0
  296. data/spec/models/widget_form_spec.rb +84 -0
  297. data/spec/models/widget_logo_body_spec.rb +40 -0
  298. data/spec/models/widget_logo_spec.rb +40 -0
  299. data/spec/models/widget_status_form_spec.rb +46 -0
  300. data/spec/spec_helper.rb +110 -0
  301. metadata +501 -0
@@ -0,0 +1,741 @@
1
+ =begin
2
+ #Indexea OpenAPI
3
+
4
+ #OpenAPI of Indexea
5
+
6
+ OpenAPI spec version: 1.0.0
7
+ Contact: indexea.com@gmail.com
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+ Swagger Codegen version: 3.0.54
10
+ =end
11
+
12
+ module IndexeaClient
13
+ class WidgetsApi
14
+ attr_accessor :api_client
15
+
16
+ def initialize(api_client = ApiClient.default)
17
+ @api_client = api_client
18
+ end
19
+ # 复制指定组件并创建新组件
20
+ # @param app 应用标识
21
+ # @param widget 源组件编号
22
+ # @param [Hash] opts the optional parameters
23
+ # @return [WidgetBean]
24
+ def widget_copy(app, widget, opts = {})
25
+ data, _status_code, _headers = widget_copy_with_http_info(app, widget, opts)
26
+ data
27
+ end
28
+
29
+ # 复制指定组件并创建新组件
30
+ # @param app 应用标识
31
+ # @param widget 源组件编号
32
+ # @param [Hash] opts the optional parameters
33
+ # @return [Array<(WidgetBean, Integer, Hash)>] WidgetBean data, response status code and response headers
34
+ def widget_copy_with_http_info(app, widget, opts = {})
35
+ if @api_client.config.debugging
36
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_copy ...'
37
+ end
38
+ # verify the required parameter 'app' is set
39
+ if @api_client.config.client_side_validation && app.nil?
40
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_copy"
41
+ end
42
+ # verify the required parameter 'widget' is set
43
+ if @api_client.config.client_side_validation && widget.nil?
44
+ fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_copy"
45
+ end
46
+ # resource path
47
+ local_var_path = '/widget/{app}/copy'.sub('{' + 'app' + '}', app.to_s)
48
+
49
+ # query parameters
50
+ query_params = opts[:query_params] || {}
51
+ query_params[:'widget'] = widget
52
+
53
+ # header parameters
54
+ header_params = opts[:header_params] || {}
55
+ # HTTP header 'Accept' (if needed)
56
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
57
+
58
+ # form parameters
59
+ form_params = opts[:form_params] || {}
60
+
61
+ # http body (model)
62
+ post_body = opts[:body]
63
+
64
+ return_type = opts[:return_type] || 'WidgetBean'
65
+
66
+ auth_names = opts[:auth_names] || ['TokenAuth']
67
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
68
+ :header_params => header_params,
69
+ :query_params => query_params,
70
+ :form_params => form_params,
71
+ :body => post_body,
72
+ :auth_names => auth_names,
73
+ :return_type => return_type)
74
+
75
+ if @api_client.config.debugging
76
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_copy\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
77
+ end
78
+ return data, status_code, headers
79
+ end
80
+ # 复制组件到已有组件
81
+ # @param app 应用标识
82
+ # @param widget 源组件编号
83
+ # @param to 目标组件编号
84
+ # @param [Hash] opts the optional parameters
85
+ # @return [BOOLEAN]
86
+ def widget_copy_to_widget(app, widget, to, opts = {})
87
+ data, _status_code, _headers = widget_copy_to_widget_with_http_info(app, widget, to, opts)
88
+ data
89
+ end
90
+
91
+ # 复制组件到已有组件
92
+ # @param app 应用标识
93
+ # @param widget 源组件编号
94
+ # @param to 目标组件编号
95
+ # @param [Hash] opts the optional parameters
96
+ # @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
97
+ def widget_copy_to_widget_with_http_info(app, widget, to, opts = {})
98
+ if @api_client.config.debugging
99
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_copy_to_widget ...'
100
+ end
101
+ # verify the required parameter 'app' is set
102
+ if @api_client.config.client_side_validation && app.nil?
103
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_copy_to_widget"
104
+ end
105
+ # verify the required parameter 'widget' is set
106
+ if @api_client.config.client_side_validation && widget.nil?
107
+ fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_copy_to_widget"
108
+ end
109
+ # verify the required parameter 'to' is set
110
+ if @api_client.config.client_side_validation && to.nil?
111
+ fail ArgumentError, "Missing the required parameter 'to' when calling WidgetsApi.widget_copy_to_widget"
112
+ end
113
+ # resource path
114
+ local_var_path = '/widget/{app}/copy'.sub('{' + 'app' + '}', app.to_s)
115
+
116
+ # query parameters
117
+ query_params = opts[:query_params] || {}
118
+ query_params[:'widget'] = widget
119
+ query_params[:'to'] = to
120
+
121
+ # header parameters
122
+ header_params = opts[:header_params] || {}
123
+ # HTTP header 'Accept' (if needed)
124
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
125
+
126
+ # form parameters
127
+ form_params = opts[:form_params] || {}
128
+
129
+ # http body (model)
130
+ post_body = opts[:body]
131
+
132
+ return_type = opts[:return_type] || 'BOOLEAN'
133
+
134
+ auth_names = opts[:auth_names] || ['TokenAuth']
135
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
136
+ :header_params => header_params,
137
+ :query_params => query_params,
138
+ :form_params => form_params,
139
+ :body => post_body,
140
+ :auth_names => auth_names,
141
+ :return_type => return_type)
142
+
143
+ if @api_client.config.debugging
144
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_copy_to_widget\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
145
+ end
146
+ return data, status_code, headers
147
+ end
148
+ # 创建组件
149
+ # @param body
150
+ # @param app 应用标识
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [WidgetBean]
153
+ def widget_create(body, app, opts = {})
154
+ data, _status_code, _headers = widget_create_with_http_info(body, app, opts)
155
+ data
156
+ end
157
+
158
+ # 创建组件
159
+ # @param body
160
+ # @param app 应用标识
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(WidgetBean, Integer, Hash)>] WidgetBean data, response status code and response headers
163
+ def widget_create_with_http_info(body, app, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_create ...'
166
+ end
167
+ # verify the required parameter 'body' is set
168
+ if @api_client.config.client_side_validation && body.nil?
169
+ fail ArgumentError, "Missing the required parameter 'body' when calling WidgetsApi.widget_create"
170
+ end
171
+ # verify the required parameter 'app' is set
172
+ if @api_client.config.client_side_validation && app.nil?
173
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_create"
174
+ end
175
+ # resource path
176
+ local_var_path = '/widgets/{app}'.sub('{' + 'app' + '}', app.to_s)
177
+
178
+ # query parameters
179
+ query_params = opts[:query_params] || {}
180
+
181
+ # header parameters
182
+ header_params = opts[:header_params] || {}
183
+ # HTTP header 'Accept' (if needed)
184
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
185
+ # HTTP header 'Content-Type'
186
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
187
+
188
+ # form parameters
189
+ form_params = opts[:form_params] || {}
190
+
191
+ # http body (model)
192
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
193
+
194
+ return_type = opts[:return_type] || 'WidgetBean'
195
+
196
+ auth_names = opts[:auth_names] || ['TokenAuth']
197
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
198
+ :header_params => header_params,
199
+ :query_params => query_params,
200
+ :form_params => form_params,
201
+ :body => post_body,
202
+ :auth_names => auth_names,
203
+ :return_type => return_type)
204
+
205
+ if @api_client.config.debugging
206
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_create\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
207
+ end
208
+ return data, status_code, headers
209
+ end
210
+ # 删除组件
211
+ # @param app 应用标识
212
+ # @param widget 组件编号
213
+ # @param [Hash] opts the optional parameters
214
+ # @option opts [String] :password
215
+ # @return [BOOLEAN]
216
+ def widget_delete(app, widget, opts = {})
217
+ data, _status_code, _headers = widget_delete_with_http_info(app, widget, opts)
218
+ data
219
+ end
220
+
221
+ # 删除组件
222
+ # @param app 应用标识
223
+ # @param widget 组件编号
224
+ # @param [Hash] opts the optional parameters
225
+ # @option opts [String] :password
226
+ # @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
227
+ def widget_delete_with_http_info(app, widget, opts = {})
228
+ if @api_client.config.debugging
229
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_delete ...'
230
+ end
231
+ # verify the required parameter 'app' is set
232
+ if @api_client.config.client_side_validation && app.nil?
233
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_delete"
234
+ end
235
+ # verify the required parameter 'widget' is set
236
+ if @api_client.config.client_side_validation && widget.nil?
237
+ fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_delete"
238
+ end
239
+ # resource path
240
+ local_var_path = '/widgets/{app}/{widget}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', widget.to_s)
241
+
242
+ # query parameters
243
+ query_params = opts[:query_params] || {}
244
+
245
+ # header parameters
246
+ header_params = opts[:header_params] || {}
247
+ # HTTP header 'Accept' (if needed)
248
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
249
+ # HTTP header 'Content-Type'
250
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
251
+
252
+ # form parameters
253
+ form_params = opts[:form_params] || {}
254
+ form_params['password'] = opts[:'password'] if !opts[:'password'].nil?
255
+
256
+ # http body (model)
257
+ post_body = opts[:body]
258
+
259
+ return_type = opts[:return_type] || 'BOOLEAN'
260
+
261
+ auth_names = opts[:auth_names] || ['TokenAuth']
262
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
263
+ :header_params => header_params,
264
+ :query_params => query_params,
265
+ :form_params => form_params,
266
+ :body => post_body,
267
+ :auth_names => auth_names,
268
+ :return_type => return_type)
269
+
270
+ if @api_client.config.debugging
271
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_delete\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
272
+ end
273
+ return data, status_code, headers
274
+ end
275
+ # 获取UI组件的所有相关信息
276
+ # @param ident UI组件的唯一标识
277
+ # @param [Hash] opts the optional parameters
278
+ # @option opts [String] :x_token 如果要使用非发布的组件,需要组件作者授权
279
+ # @return [WidgetBean]
280
+ def widget_detail(ident, opts = {})
281
+ data, _status_code, _headers = widget_detail_with_http_info(ident, opts)
282
+ data
283
+ end
284
+
285
+ # 获取UI组件的所有相关信息
286
+ # @param ident UI组件的唯一标识
287
+ # @param [Hash] opts the optional parameters
288
+ # @option opts [String] :x_token 如果要使用非发布的组件,需要组件作者授权
289
+ # @return [Array<(WidgetBean, Integer, Hash)>] WidgetBean data, response status code and response headers
290
+ def widget_detail_with_http_info(ident, opts = {})
291
+ if @api_client.config.debugging
292
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_detail ...'
293
+ end
294
+ # verify the required parameter 'ident' is set
295
+ if @api_client.config.client_side_validation && ident.nil?
296
+ fail ArgumentError, "Missing the required parameter 'ident' when calling WidgetsApi.widget_detail"
297
+ end
298
+ # resource path
299
+ local_var_path = '/widget/{ident}'.sub('{' + 'ident' + '}', ident.to_s)
300
+
301
+ # query parameters
302
+ query_params = opts[:query_params] || {}
303
+
304
+ # header parameters
305
+ header_params = opts[:header_params] || {}
306
+ # HTTP header 'Accept' (if needed)
307
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
308
+ header_params[:'x-token'] = opts[:'x_token'] if !opts[:'x_token'].nil?
309
+
310
+ # form parameters
311
+ form_params = opts[:form_params] || {}
312
+
313
+ # http body (model)
314
+ post_body = opts[:body]
315
+
316
+ return_type = opts[:return_type] || 'WidgetBean'
317
+
318
+ auth_names = opts[:auth_names] || []
319
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
320
+ :header_params => header_params,
321
+ :query_params => query_params,
322
+ :form_params => form_params,
323
+ :body => post_body,
324
+ :auth_names => auth_names,
325
+ :return_type => return_type)
326
+
327
+ if @api_client.config.debugging
328
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_detail\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
329
+ end
330
+ return data, status_code, headers
331
+ end
332
+ # 下载组件应用源码
333
+ # @param app 应用标识
334
+ # @param widget 组件编号
335
+ # @param framework 指定的技术框架
336
+ # @param [Hash] opts the optional parameters
337
+ # @return [String]
338
+ def widget_download(app, widget, framework, opts = {})
339
+ data, _status_code, _headers = widget_download_with_http_info(app, widget, framework, opts)
340
+ data
341
+ end
342
+
343
+ # 下载组件应用源码
344
+ # @param app 应用标识
345
+ # @param widget 组件编号
346
+ # @param framework 指定的技术框架
347
+ # @param [Hash] opts the optional parameters
348
+ # @return [Array<(String, Integer, Hash)>] String data, response status code and response headers
349
+ def widget_download_with_http_info(app, widget, framework, opts = {})
350
+ if @api_client.config.debugging
351
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_download ...'
352
+ end
353
+ # verify the required parameter 'app' is set
354
+ if @api_client.config.client_side_validation && app.nil?
355
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_download"
356
+ end
357
+ # verify the required parameter 'widget' is set
358
+ if @api_client.config.client_side_validation && widget.nil?
359
+ fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_download"
360
+ end
361
+ # verify the required parameter 'framework' is set
362
+ if @api_client.config.client_side_validation && framework.nil?
363
+ fail ArgumentError, "Missing the required parameter 'framework' when calling WidgetsApi.widget_download"
364
+ end
365
+ # resource path
366
+ local_var_path = '/widgets/{app}/{widget}/download'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', widget.to_s)
367
+
368
+ # query parameters
369
+ query_params = opts[:query_params] || {}
370
+ query_params[:'framework'] = framework
371
+
372
+ # header parameters
373
+ header_params = opts[:header_params] || {}
374
+ # HTTP header 'Accept' (if needed)
375
+ header_params['Accept'] = @api_client.select_header_accept(['default'])
376
+
377
+ # form parameters
378
+ form_params = opts[:form_params] || {}
379
+
380
+ # http body (model)
381
+ post_body = opts[:body]
382
+
383
+ return_type = opts[:return_type] || 'String'
384
+
385
+ auth_names = opts[:auth_names] || ['TokenAuth']
386
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
387
+ :header_params => header_params,
388
+ :query_params => query_params,
389
+ :form_params => form_params,
390
+ :body => post_body,
391
+ :auth_names => auth_names,
392
+ :return_type => return_type)
393
+
394
+ if @api_client.config.debugging
395
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_download\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
396
+ end
397
+ return data, status_code, headers
398
+ end
399
+ # 获取组件的详情
400
+ # @param app 应用标识
401
+ # @param widget 组件编号
402
+ # @param [Hash] opts the optional parameters
403
+ # @return [WidgetBean]
404
+ def widget_get(app, widget, opts = {})
405
+ data, _status_code, _headers = widget_get_with_http_info(app, widget, opts)
406
+ data
407
+ end
408
+
409
+ # 获取组件的详情
410
+ # @param app 应用标识
411
+ # @param widget 组件编号
412
+ # @param [Hash] opts the optional parameters
413
+ # @return [Array<(WidgetBean, Integer, Hash)>] WidgetBean data, response status code and response headers
414
+ def widget_get_with_http_info(app, widget, opts = {})
415
+ if @api_client.config.debugging
416
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_get ...'
417
+ end
418
+ # verify the required parameter 'app' is set
419
+ if @api_client.config.client_side_validation && app.nil?
420
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_get"
421
+ end
422
+ # verify the required parameter 'widget' is set
423
+ if @api_client.config.client_side_validation && widget.nil?
424
+ fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_get"
425
+ end
426
+ # resource path
427
+ local_var_path = '/widgets/{app}/{widget}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', widget.to_s)
428
+
429
+ # query parameters
430
+ query_params = opts[:query_params] || {}
431
+
432
+ # header parameters
433
+ header_params = opts[:header_params] || {}
434
+ # HTTP header 'Accept' (if needed)
435
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
436
+
437
+ # form parameters
438
+ form_params = opts[:form_params] || {}
439
+
440
+ # http body (model)
441
+ post_body = opts[:body]
442
+
443
+ return_type = opts[:return_type] || 'WidgetBean'
444
+
445
+ auth_names = opts[:auth_names] || ['TokenAuth']
446
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
447
+ :header_params => header_params,
448
+ :query_params => query_params,
449
+ :form_params => form_params,
450
+ :body => post_body,
451
+ :auth_names => auth_names,
452
+ :return_type => return_type)
453
+
454
+ if @api_client.config.debugging
455
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_get\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
456
+ end
457
+ return data, status_code, headers
458
+ end
459
+ # 获取应用的组件列表
460
+ # @param app 应用标识
461
+ # @param [Hash] opts the optional parameters
462
+ # @return [Array<WidgetBean>]
463
+ def widget_list(app, opts = {})
464
+ data, _status_code, _headers = widget_list_with_http_info(app, opts)
465
+ data
466
+ end
467
+
468
+ # 获取应用的组件列表
469
+ # @param app 应用标识
470
+ # @param [Hash] opts the optional parameters
471
+ # @return [Array<(Array<WidgetBean>, Integer, Hash)>] Array<WidgetBean> data, response status code and response headers
472
+ def widget_list_with_http_info(app, opts = {})
473
+ if @api_client.config.debugging
474
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_list ...'
475
+ end
476
+ # verify the required parameter 'app' is set
477
+ if @api_client.config.client_side_validation && app.nil?
478
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_list"
479
+ end
480
+ # resource path
481
+ local_var_path = '/widgets/{app}'.sub('{' + 'app' + '}', app.to_s)
482
+
483
+ # query parameters
484
+ query_params = opts[:query_params] || {}
485
+
486
+ # header parameters
487
+ header_params = opts[:header_params] || {}
488
+ # HTTP header 'Accept' (if needed)
489
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
490
+
491
+ # form parameters
492
+ form_params = opts[:form_params] || {}
493
+
494
+ # http body (model)
495
+ post_body = opts[:body]
496
+
497
+ return_type = opts[:return_type] || 'Array<WidgetBean>'
498
+
499
+ auth_names = opts[:auth_names] || ['TokenAuth']
500
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
501
+ :header_params => header_params,
502
+ :query_params => query_params,
503
+ :form_params => form_params,
504
+ :body => post_body,
505
+ :auth_names => auth_names,
506
+ :return_type => return_type)
507
+
508
+ if @api_client.config.debugging
509
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_list\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
510
+ end
511
+ return data, status_code, headers
512
+ end
513
+ # 设置组件 Logo
514
+ # @param app 应用标识
515
+ # @param widget 组件编号
516
+ # @param [Hash] opts the optional parameters
517
+ # @option opts [String] :logo
518
+ # @return [WidgetLogo]
519
+ def widget_logo(app, widget, opts = {})
520
+ data, _status_code, _headers = widget_logo_with_http_info(app, widget, opts)
521
+ data
522
+ end
523
+
524
+ # 设置组件 Logo
525
+ # @param app 应用标识
526
+ # @param widget 组件编号
527
+ # @param [Hash] opts the optional parameters
528
+ # @option opts [String] :logo
529
+ # @return [Array<(WidgetLogo, Integer, Hash)>] WidgetLogo data, response status code and response headers
530
+ def widget_logo_with_http_info(app, widget, opts = {})
531
+ if @api_client.config.debugging
532
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_logo ...'
533
+ end
534
+ # verify the required parameter 'app' is set
535
+ if @api_client.config.client_side_validation && app.nil?
536
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_logo"
537
+ end
538
+ # verify the required parameter 'widget' is set
539
+ if @api_client.config.client_side_validation && widget.nil?
540
+ fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_logo"
541
+ end
542
+ # resource path
543
+ local_var_path = '/widgets/{app}/{widget}/logo'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', widget.to_s)
544
+
545
+ # query parameters
546
+ query_params = opts[:query_params] || {}
547
+
548
+ # header parameters
549
+ header_params = opts[:header_params] || {}
550
+ # HTTP header 'Accept' (if needed)
551
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
552
+ # HTTP header 'Content-Type'
553
+ header_params['Content-Type'] = @api_client.select_header_content_type(['multipart/form-data'])
554
+
555
+ # form parameters
556
+ form_params = opts[:form_params] || {}
557
+ form_params['logo'] = opts[:'logo'] if !opts[:'logo'].nil?
558
+
559
+ # http body (model)
560
+ post_body = opts[:body]
561
+
562
+ return_type = opts[:return_type] || 'WidgetLogo'
563
+
564
+ auth_names = opts[:auth_names] || ['TokenAuth']
565
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
566
+ :header_params => header_params,
567
+ :query_params => query_params,
568
+ :form_params => form_params,
569
+ :body => post_body,
570
+ :auth_names => auth_names,
571
+ :return_type => return_type)
572
+
573
+ if @api_client.config.debugging
574
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_logo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
575
+ end
576
+ return data, status_code, headers
577
+ end
578
+ # 修改组件
579
+ # @param body
580
+ # @param app 应用标识
581
+ # @param widget 组件编号
582
+ # @param [Hash] opts the optional parameters
583
+ # @return [WidgetBean]
584
+ def widget_update(body, app, widget, opts = {})
585
+ data, _status_code, _headers = widget_update_with_http_info(body, app, widget, opts)
586
+ data
587
+ end
588
+
589
+ # 修改组件
590
+ # @param body
591
+ # @param app 应用标识
592
+ # @param widget 组件编号
593
+ # @param [Hash] opts the optional parameters
594
+ # @return [Array<(WidgetBean, Integer, Hash)>] WidgetBean data, response status code and response headers
595
+ def widget_update_with_http_info(body, app, widget, opts = {})
596
+ if @api_client.config.debugging
597
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_update ...'
598
+ end
599
+ # verify the required parameter 'body' is set
600
+ if @api_client.config.client_side_validation && body.nil?
601
+ fail ArgumentError, "Missing the required parameter 'body' when calling WidgetsApi.widget_update"
602
+ end
603
+ # verify the required parameter 'app' is set
604
+ if @api_client.config.client_side_validation && app.nil?
605
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_update"
606
+ end
607
+ # verify the required parameter 'widget' is set
608
+ if @api_client.config.client_side_validation && widget.nil?
609
+ fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_update"
610
+ end
611
+ # resource path
612
+ local_var_path = '/widgets/{app}/{widget}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', widget.to_s)
613
+
614
+ # query parameters
615
+ query_params = opts[:query_params] || {}
616
+
617
+ # header parameters
618
+ header_params = opts[:header_params] || {}
619
+ # HTTP header 'Accept' (if needed)
620
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
621
+ # HTTP header 'Content-Type'
622
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
623
+
624
+ # form parameters
625
+ form_params = opts[:form_params] || {}
626
+
627
+ # http body (model)
628
+ post_body = opts[:body] || @api_client.object_to_http_body(body)
629
+
630
+ return_type = opts[:return_type] || 'WidgetBean'
631
+
632
+ auth_names = opts[:auth_names] || ['TokenAuth']
633
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
634
+ :header_params => header_params,
635
+ :query_params => query_params,
636
+ :form_params => form_params,
637
+ :body => post_body,
638
+ :auth_names => auth_names,
639
+ :return_type => return_type)
640
+
641
+ if @api_client.config.debugging
642
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_update\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
643
+ end
644
+ return data, status_code, headers
645
+ end
646
+ # 修改组件设置参数
647
+ # @param key
648
+ # @param type
649
+ # @param value
650
+ # @param vcode
651
+ # @param app 应用标识
652
+ # @param widget 组件编号
653
+ # @param [Hash] opts the optional parameters
654
+ # @return [BOOLEAN]
655
+ def widget_update_settings(key, type, value, vcode, app, widget, opts = {})
656
+ data, _status_code, _headers = widget_update_settings_with_http_info(key, type, value, vcode, app, widget, opts)
657
+ data
658
+ end
659
+
660
+ # 修改组件设置参数
661
+ # @param key
662
+ # @param type
663
+ # @param value
664
+ # @param vcode
665
+ # @param app 应用标识
666
+ # @param widget 组件编号
667
+ # @param [Hash] opts the optional parameters
668
+ # @return [Array<(BOOLEAN, Integer, Hash)>] BOOLEAN data, response status code and response headers
669
+ def widget_update_settings_with_http_info(key, type, value, vcode, app, widget, opts = {})
670
+ if @api_client.config.debugging
671
+ @api_client.config.logger.debug 'Calling API: WidgetsApi.widget_update_settings ...'
672
+ end
673
+ # verify the required parameter 'key' is set
674
+ if @api_client.config.client_side_validation && key.nil?
675
+ fail ArgumentError, "Missing the required parameter 'key' when calling WidgetsApi.widget_update_settings"
676
+ end
677
+ # verify the required parameter 'type' is set
678
+ if @api_client.config.client_side_validation && type.nil?
679
+ fail ArgumentError, "Missing the required parameter 'type' when calling WidgetsApi.widget_update_settings"
680
+ end
681
+ # verify enum value
682
+ if @api_client.config.client_side_validation && !['int', 'bool', 'string'].include?(type)
683
+ fail ArgumentError, "invalid value for 'type', must be one of int, bool, string"
684
+ end
685
+ # verify the required parameter 'value' is set
686
+ if @api_client.config.client_side_validation && value.nil?
687
+ fail ArgumentError, "Missing the required parameter 'value' when calling WidgetsApi.widget_update_settings"
688
+ end
689
+ # verify the required parameter 'vcode' is set
690
+ if @api_client.config.client_side_validation && vcode.nil?
691
+ fail ArgumentError, "Missing the required parameter 'vcode' when calling WidgetsApi.widget_update_settings"
692
+ end
693
+ # verify the required parameter 'app' is set
694
+ if @api_client.config.client_side_validation && app.nil?
695
+ fail ArgumentError, "Missing the required parameter 'app' when calling WidgetsApi.widget_update_settings"
696
+ end
697
+ # verify the required parameter 'widget' is set
698
+ if @api_client.config.client_side_validation && widget.nil?
699
+ fail ArgumentError, "Missing the required parameter 'widget' when calling WidgetsApi.widget_update_settings"
700
+ end
701
+ # resource path
702
+ local_var_path = '/widgets/{app}/{widget}'.sub('{' + 'app' + '}', app.to_s).sub('{' + 'widget' + '}', widget.to_s)
703
+
704
+ # query parameters
705
+ query_params = opts[:query_params] || {}
706
+
707
+ # header parameters
708
+ header_params = opts[:header_params] || {}
709
+ # HTTP header 'Accept' (if needed)
710
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
711
+ # HTTP header 'Content-Type'
712
+ header_params['Content-Type'] = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
713
+
714
+ # form parameters
715
+ form_params = opts[:form_params] || {}
716
+ form_params['key'] = key
717
+ form_params['type'] = type
718
+ form_params['value'] = value
719
+ form_params['vcode'] = vcode
720
+
721
+ # http body (model)
722
+ post_body = opts[:body]
723
+
724
+ return_type = opts[:return_type] || 'BOOLEAN'
725
+
726
+ auth_names = opts[:auth_names] || ['TokenAuth']
727
+ data, status_code, headers = @api_client.call_api(:PATCH, local_var_path,
728
+ :header_params => header_params,
729
+ :query_params => query_params,
730
+ :form_params => form_params,
731
+ :body => post_body,
732
+ :auth_names => auth_names,
733
+ :return_type => return_type)
734
+
735
+ if @api_client.config.debugging
736
+ @api_client.config.logger.debug "API called: WidgetsApi#widget_update_settings\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
737
+ end
738
+ return data, status_code, headers
739
+ end
740
+ end
741
+ end