osdn-client 0.0.20161003 → 0.0.20171120

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 (186) hide show
  1. checksums.yaml +5 -5
  2. data/README.md +168 -6
  3. data/docs/FrsAdminPrefs.md +9 -0
  4. data/docs/Group.md +1 -3
  5. data/docs/GroupProfile.md +10 -0
  6. data/docs/GroupProfilePerLanguage.md +10 -0
  7. data/docs/GroupToolFlags.md +1 -2
  8. data/docs/History.md +15 -0
  9. data/docs/I18NText.md +9 -0
  10. data/docs/ProjectApi.md +4021 -209
  11. data/docs/ProjectBzr.md +22 -0
  12. data/docs/ProjectFrsApi.md +118 -4
  13. data/docs/ProjectGit.md +27 -0
  14. data/docs/ProjectHg.md +22 -0
  15. data/docs/ProjectSCM.md +22 -0
  16. data/docs/ProjectSCMApi.md +1214 -0
  17. data/docs/ProjectSCMLastCommit.md +11 -0
  18. data/docs/ProjectSvn.md +25 -0
  19. data/docs/ProjectTicketApi.md +1847 -0
  20. data/docs/ProjectTicketComment.md +13 -0
  21. data/docs/ProjectTicketComponent.md +14 -0
  22. data/docs/ProjectTicketComponentSummary.md +10 -0
  23. data/docs/ProjectTicketComponentSummarySummarizedBy.md +12 -0
  24. data/docs/ProjectTicketHistory.md +14 -0
  25. data/docs/ProjectTicketItem.md +25 -0
  26. data/docs/ProjectTicketMilestone.md +14 -0
  27. data/docs/ProjectTicketMilestoneSummary.md +10 -0
  28. data/docs/ProjectTicketMilestoneSummarySummarizedBy.md +12 -0
  29. data/docs/ProjectTicketPrefs.md +13 -0
  30. data/docs/ProjectTicketType.md +15 -0
  31. data/docs/ProjectTicketTypeInstructionPerLanguage.md +9 -0
  32. data/docs/ProjectTicketTypeInstructions.md +9 -0
  33. data/docs/ProjectTicketTypeSummary.md +10 -0
  34. data/docs/ProjectTicketTypeSummarySummarizedBy.md +12 -0
  35. data/docs/ProjectWeb.md +8 -0
  36. data/docs/ScmHook.md +18 -0
  37. data/docs/SummariadByComponent.md +7 -0
  38. data/docs/SummariadByComponentInner.md +10 -0
  39. data/docs/SummariadByMilestone.md +7 -0
  40. data/docs/SummariadByMilestoneInner.md +10 -0
  41. data/docs/SummariadByOwner.md +7 -0
  42. data/docs/SummariadByOwnerInner.md +10 -0
  43. data/docs/SummariadByPriority.md +7 -0
  44. data/docs/SummariadByPriorityInner.md +10 -0
  45. data/docs/SummariadBySeverity.md +7 -0
  46. data/docs/SummariadBySeverityInner.md +10 -0
  47. data/docs/SummariadByType.md +7 -0
  48. data/docs/SummariadByTypeInner.md +10 -0
  49. data/docs/User.md +5 -3
  50. data/docs/UserApi.md +279 -0
  51. data/docs/UserImages.md +12 -0
  52. data/docs/UserStats.md +33 -0
  53. data/lib/osdn-client.rb +45 -1
  54. data/lib/osdn-client/api/default_api.rb +1 -1
  55. data/lib/osdn-client/api/project_api.rb +4574 -396
  56. data/lib/osdn-client/api/project_frs_api.rb +122 -5
  57. data/lib/osdn-client/api/project_news_api.rb +1 -1
  58. data/lib/osdn-client/api/project_scm_api.rb +1310 -0
  59. data/lib/osdn-client/api/project_ticket_api.rb +2124 -0
  60. data/lib/osdn-client/api/user_api.rb +294 -1
  61. data/lib/osdn-client/api_client.rb +1 -1
  62. data/lib/osdn-client/api_error.rb +1 -1
  63. data/lib/osdn-client/configuration.rb +1 -1
  64. data/lib/osdn-client/models/frs_admin_prefs.rb +208 -0
  65. data/lib/osdn-client/models/group.rb +8 -26
  66. data/lib/osdn-client/models/group_profile.rb +223 -0
  67. data/lib/osdn-client/models/group_profile_per_language.rb +217 -0
  68. data/lib/osdn-client/models/group_tool_flags.rb +11 -20
  69. data/lib/osdn-client/models/history.rb +262 -0
  70. data/lib/osdn-client/models/i18_n_text.rb +208 -0
  71. data/lib/osdn-client/models/news.rb +1 -1
  72. data/lib/osdn-client/models/package.rb +1 -1
  73. data/lib/osdn-client/models/pong.rb +1 -1
  74. data/lib/osdn-client/models/project_bzr.rb +329 -0
  75. data/lib/osdn-client/models/project_git.rb +374 -0
  76. data/lib/osdn-client/models/project_hg.rb +329 -0
  77. data/lib/osdn-client/models/project_scm.rb +329 -0
  78. data/lib/osdn-client/models/project_scm_last_commit.rb +226 -0
  79. data/lib/osdn-client/models/project_svn.rb +356 -0
  80. data/lib/osdn-client/models/project_ticket_comment.rb +244 -0
  81. data/lib/osdn-client/models/project_ticket_component.rb +253 -0
  82. data/lib/osdn-client/models/project_ticket_component_summary.rb +217 -0
  83. data/lib/osdn-client/models/project_ticket_component_summary_summarized_by.rb +235 -0
  84. data/lib/osdn-client/models/project_ticket_history.rb +253 -0
  85. data/lib/osdn-client/models/project_ticket_item.rb +356 -0
  86. data/lib/osdn-client/models/project_ticket_milestone.rb +253 -0
  87. data/lib/osdn-client/models/project_ticket_milestone_summary.rb +217 -0
  88. data/lib/osdn-client/models/project_ticket_milestone_summary_summarized_by.rb +235 -0
  89. data/lib/osdn-client/models/project_ticket_prefs.rb +244 -0
  90. data/lib/osdn-client/models/project_ticket_type.rb +266 -0
  91. data/lib/osdn-client/models/project_ticket_type_instruction_per_language.rb +208 -0
  92. data/lib/osdn-client/models/project_ticket_type_instructions.rb +212 -0
  93. data/lib/osdn-client/models/project_ticket_type_summary.rb +217 -0
  94. data/lib/osdn-client/models/project_ticket_type_summary_summarized_by.rb +235 -0
  95. data/lib/osdn-client/models/project_web.rb +199 -0
  96. data/lib/osdn-client/models/rel_file.rb +1 -1
  97. data/lib/osdn-client/models/release.rb +1 -1
  98. data/lib/osdn-client/models/scm_hook.rb +289 -0
  99. data/lib/osdn-client/models/simple_chamber.rb +1 -1
  100. data/lib/osdn-client/models/simple_group.rb +1 -1
  101. data/lib/osdn-client/models/simple_user.rb +1 -1
  102. data/lib/osdn-client/models/skill.rb +1 -1
  103. data/lib/osdn-client/models/summariad_by_component.rb +190 -0
  104. data/lib/osdn-client/models/summariad_by_component_inner.rb +217 -0
  105. data/lib/osdn-client/models/summariad_by_milestone.rb +190 -0
  106. data/lib/osdn-client/models/summariad_by_milestone_inner.rb +217 -0
  107. data/lib/osdn-client/models/summariad_by_owner.rb +190 -0
  108. data/lib/osdn-client/models/summariad_by_owner_inner.rb +217 -0
  109. data/lib/osdn-client/models/summariad_by_priority.rb +190 -0
  110. data/lib/osdn-client/models/summariad_by_priority_inner.rb +217 -0
  111. data/lib/osdn-client/models/summariad_by_severity.rb +190 -0
  112. data/lib/osdn-client/models/summariad_by_severity_inner.rb +217 -0
  113. data/lib/osdn-client/models/summariad_by_type.rb +190 -0
  114. data/lib/osdn-client/models/summariad_by_type_inner.rb +217 -0
  115. data/lib/osdn-client/models/token.rb +1 -1
  116. data/lib/osdn-client/models/user.rb +38 -18
  117. data/lib/osdn-client/models/user_images.rb +235 -0
  118. data/lib/osdn-client/models/user_stats.rb +424 -0
  119. data/lib/osdn-client/version.rb +2 -2
  120. data/osdn-client.gemspec +1 -1
  121. data/spec/api/default_api_spec.rb +1 -1
  122. data/spec/api/project_api_spec.rb +899 -3
  123. data/spec/api/project_frs_api_spec.rb +28 -3
  124. data/spec/api/project_news_api_spec.rb +1 -1
  125. data/spec/api/project_scm_api_spec.rb +324 -0
  126. data/spec/api/project_ticket_api_spec.rb +488 -0
  127. data/spec/api/user_api_spec.rb +63 -1
  128. data/spec/api_client_spec.rb +1 -1
  129. data/spec/configuration_spec.rb +1 -1
  130. data/spec/models/frs_admin_prefs_spec.rb +59 -0
  131. data/spec/models/group_profile_per_language_spec.rb +65 -0
  132. data/spec/models/group_profile_spec.rb +65 -0
  133. data/spec/models/group_spec.rb +2 -14
  134. data/spec/models/group_tool_flags_spec.rb +3 -9
  135. data/spec/models/history_spec.rb +95 -0
  136. data/spec/models/i18_n_text_spec.rb +59 -0
  137. data/spec/models/news_spec.rb +1 -1
  138. data/spec/models/package_spec.rb +1 -1
  139. data/spec/models/pong_spec.rb +1 -1
  140. data/spec/models/project_bzr_spec.rb +137 -0
  141. data/spec/models/project_git_spec.rb +167 -0
  142. data/spec/models/project_hg_spec.rb +137 -0
  143. data/spec/models/project_scm_last_commit_spec.rb +71 -0
  144. data/spec/models/project_scm_spec.rb +137 -0
  145. data/spec/models/project_svn_spec.rb +155 -0
  146. data/spec/models/project_ticket_comment_spec.rb +83 -0
  147. data/spec/models/project_ticket_component_spec.rb +89 -0
  148. data/spec/models/project_ticket_component_summary_spec.rb +65 -0
  149. data/spec/models/project_ticket_component_summary_summarized_by_spec.rb +77 -0
  150. data/spec/models/project_ticket_history_spec.rb +89 -0
  151. data/spec/models/project_ticket_item_spec.rb +155 -0
  152. data/spec/models/project_ticket_milestone_spec.rb +89 -0
  153. data/spec/models/project_ticket_milestone_summary_spec.rb +65 -0
  154. data/spec/models/project_ticket_milestone_summary_summarized_by_spec.rb +77 -0
  155. data/spec/models/project_ticket_prefs_spec.rb +83 -0
  156. data/spec/models/project_ticket_type_instruction_per_language_spec.rb +59 -0
  157. data/spec/models/project_ticket_type_instructions_spec.rb +59 -0
  158. data/spec/models/project_ticket_type_spec.rb +95 -0
  159. data/spec/models/project_ticket_type_summary_spec.rb +65 -0
  160. data/spec/models/project_ticket_type_summary_summarized_by_spec.rb +77 -0
  161. data/spec/models/project_web_spec.rb +53 -0
  162. data/spec/models/rel_file_spec.rb +1 -1
  163. data/spec/models/release_spec.rb +1 -1
  164. data/spec/models/scm_hook_spec.rb +113 -0
  165. data/spec/models/simple_chamber_spec.rb +1 -1
  166. data/spec/models/simple_group_spec.rb +1 -1
  167. data/spec/models/simple_user_spec.rb +1 -1
  168. data/spec/models/skill_spec.rb +1 -1
  169. data/spec/models/summariad_by_component_inner_spec.rb +65 -0
  170. data/spec/models/summariad_by_component_spec.rb +47 -0
  171. data/spec/models/summariad_by_milestone_inner_spec.rb +65 -0
  172. data/spec/models/summariad_by_milestone_spec.rb +47 -0
  173. data/spec/models/summariad_by_owner_inner_spec.rb +65 -0
  174. data/spec/models/summariad_by_owner_spec.rb +47 -0
  175. data/spec/models/summariad_by_priority_inner_spec.rb +65 -0
  176. data/spec/models/summariad_by_priority_spec.rb +47 -0
  177. data/spec/models/summariad_by_severity_inner_spec.rb +65 -0
  178. data/spec/models/summariad_by_severity_spec.rb +47 -0
  179. data/spec/models/summariad_by_type_inner_spec.rb +65 -0
  180. data/spec/models/summariad_by_type_spec.rb +47 -0
  181. data/spec/models/token_spec.rb +1 -1
  182. data/spec/models/user_images_spec.rb +77 -0
  183. data/spec/models/user_spec.rb +16 -4
  184. data/spec/models/user_stats_spec.rb +203 -0
  185. data/spec/spec_helper.rb +1 -1
  186. metadata +179 -3
@@ -3,7 +3,7 @@
3
3
 
4
4
  #OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.net/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.net/projects/osdn-codes/releases/p14859 .
5
5
 
6
- OpenAPI spec version: 0.0.20161003
6
+ OpenAPI spec version: 0.0.20171120
7
7
  Contact: admin@osdn.net
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -87,5 +87,298 @@ module OSDNClient
87
87
  end
88
88
  return data, status_code, headers
89
89
  end
90
+
91
+ #
92
+ # get user monthly stats.
93
+ # @param id_or_name numeric user id or user name
94
+ # @param [Hash] opts the optional parameters
95
+ # @return [Array<History>]
96
+ def get_user_history(id_or_name, opts = {})
97
+ data, _status_code, _headers = get_user_history_with_http_info(id_or_name, opts)
98
+ return data
99
+ end
100
+
101
+ #
102
+ # get user monthly stats.
103
+ # @param id_or_name numeric user id or user name
104
+ # @param [Hash] opts the optional parameters
105
+ # @return [Array<(Array<History>, Fixnum, Hash)>] Array<History> data, response status code and response headers
106
+ def get_user_history_with_http_info(id_or_name, opts = {})
107
+ if @api_client.config.debugging
108
+ @api_client.config.logger.debug "Calling API: UserApi.get_user_history ..."
109
+ end
110
+ # verify the required parameter 'id_or_name' is set
111
+ fail ArgumentError, "Missing the required parameter 'id_or_name' when calling UserApi.get_user_history" if id_or_name.nil?
112
+ # resource path
113
+ local_var_path = "/user/{id_or_name}/history".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
114
+
115
+ # query parameters
116
+ query_params = {}
117
+
118
+ # header parameters
119
+ header_params = {}
120
+
121
+ # HTTP header 'Accept' (if needed)
122
+ local_header_accept = []
123
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
124
+
125
+ # HTTP header 'Content-Type'
126
+ local_header_content_type = ['application/x-www-form-urlencoded']
127
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
128
+
129
+ # form parameters
130
+ form_params = {}
131
+
132
+ # http body (model)
133
+ post_body = nil
134
+ auth_names = ['oauth2-code', 'oauth2-implicit']
135
+ data, status_code, headers = @api_client.call_api(:GET, 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 => 'Array<History>')
142
+ if @api_client.config.debugging
143
+ @api_client.config.logger.debug "API called: UserApi#get_user_history\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
144
+ end
145
+ return data, status_code, headers
146
+ end
147
+
148
+ #
149
+ # get user daily stats.
150
+ # @param id_or_name numeric user id or user name
151
+ # @param [Hash] opts the optional parameters
152
+ # @return [Array<UserStats>]
153
+ def get_user_stats_daily(id_or_name, opts = {})
154
+ data, _status_code, _headers = get_user_stats_daily_with_http_info(id_or_name, opts)
155
+ return data
156
+ end
157
+
158
+ #
159
+ # get user daily stats.
160
+ # @param id_or_name numeric user id or user name
161
+ # @param [Hash] opts the optional parameters
162
+ # @return [Array<(Array<UserStats>, Fixnum, Hash)>] Array<UserStats> data, response status code and response headers
163
+ def get_user_stats_daily_with_http_info(id_or_name, opts = {})
164
+ if @api_client.config.debugging
165
+ @api_client.config.logger.debug "Calling API: UserApi.get_user_stats_daily ..."
166
+ end
167
+ # verify the required parameter 'id_or_name' is set
168
+ fail ArgumentError, "Missing the required parameter 'id_or_name' when calling UserApi.get_user_stats_daily" if id_or_name.nil?
169
+ # resource path
170
+ local_var_path = "/user/{id_or_name}/stats/daily".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
171
+
172
+ # query parameters
173
+ query_params = {}
174
+
175
+ # header parameters
176
+ header_params = {}
177
+
178
+ # HTTP header 'Accept' (if needed)
179
+ local_header_accept = []
180
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
181
+
182
+ # HTTP header 'Content-Type'
183
+ local_header_content_type = ['application/x-www-form-urlencoded']
184
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
185
+
186
+ # form parameters
187
+ form_params = {}
188
+
189
+ # http body (model)
190
+ post_body = nil
191
+ auth_names = ['oauth2-code', 'oauth2-implicit']
192
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
193
+ :header_params => header_params,
194
+ :query_params => query_params,
195
+ :form_params => form_params,
196
+ :body => post_body,
197
+ :auth_names => auth_names,
198
+ :return_type => 'Array<UserStats>')
199
+ if @api_client.config.debugging
200
+ @api_client.config.logger.debug "API called: UserApi#get_user_stats_daily\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
201
+ end
202
+ return data, status_code, headers
203
+ end
204
+
205
+ #
206
+ # get user monthly stats.
207
+ # @param id_or_name numeric user id or user name
208
+ # @param [Hash] opts the optional parameters
209
+ # @return [Array<UserStats>]
210
+ def get_user_stats_monthly(id_or_name, opts = {})
211
+ data, _status_code, _headers = get_user_stats_monthly_with_http_info(id_or_name, opts)
212
+ return data
213
+ end
214
+
215
+ #
216
+ # get user monthly stats.
217
+ # @param id_or_name numeric user id or user name
218
+ # @param [Hash] opts the optional parameters
219
+ # @return [Array<(Array<UserStats>, Fixnum, Hash)>] Array<UserStats> data, response status code and response headers
220
+ def get_user_stats_monthly_with_http_info(id_or_name, opts = {})
221
+ if @api_client.config.debugging
222
+ @api_client.config.logger.debug "Calling API: UserApi.get_user_stats_monthly ..."
223
+ end
224
+ # verify the required parameter 'id_or_name' is set
225
+ fail ArgumentError, "Missing the required parameter 'id_or_name' when calling UserApi.get_user_stats_monthly" if id_or_name.nil?
226
+ # resource path
227
+ local_var_path = "/user/{id_or_name}/stats/monthly".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
228
+
229
+ # query parameters
230
+ query_params = {}
231
+
232
+ # header parameters
233
+ header_params = {}
234
+
235
+ # HTTP header 'Accept' (if needed)
236
+ local_header_accept = []
237
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
238
+
239
+ # HTTP header 'Content-Type'
240
+ local_header_content_type = ['application/x-www-form-urlencoded']
241
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
242
+
243
+ # form parameters
244
+ form_params = {}
245
+
246
+ # http body (model)
247
+ post_body = nil
248
+ auth_names = ['oauth2-code', 'oauth2-implicit']
249
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path,
250
+ :header_params => header_params,
251
+ :query_params => query_params,
252
+ :form_params => form_params,
253
+ :body => post_body,
254
+ :auth_names => auth_names,
255
+ :return_type => 'Array<UserStats>')
256
+ if @api_client.config.debugging
257
+ @api_client.config.logger.debug "API called: UserApi#get_user_stats_monthly\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
258
+ end
259
+ return data, status_code, headers
260
+ end
261
+
262
+ #
263
+ # Update user icon, the image will be resized to 12x12 automatically.
264
+ # @param id_or_name numeric user id or user name
265
+ # @param image The image data to update, you need to send with multipart/form-data.
266
+ # @param [Hash] opts the optional parameters
267
+ # @return [nil]
268
+ def update_user_icon(id_or_name, image, opts = {})
269
+ update_user_icon_with_http_info(id_or_name, image, opts)
270
+ return nil
271
+ end
272
+
273
+ #
274
+ # Update user icon, the image will be resized to 12x12 automatically.
275
+ # @param id_or_name numeric user id or user name
276
+ # @param image The image data to update, you need to send with multipart/form-data.
277
+ # @param [Hash] opts the optional parameters
278
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
279
+ def update_user_icon_with_http_info(id_or_name, image, opts = {})
280
+ if @api_client.config.debugging
281
+ @api_client.config.logger.debug "Calling API: UserApi.update_user_icon ..."
282
+ end
283
+ # verify the required parameter 'id_or_name' is set
284
+ fail ArgumentError, "Missing the required parameter 'id_or_name' when calling UserApi.update_user_icon" if id_or_name.nil?
285
+ # verify the required parameter 'image' is set
286
+ fail ArgumentError, "Missing the required parameter 'image' when calling UserApi.update_user_icon" if image.nil?
287
+ # resource path
288
+ local_var_path = "/user/{id_or_name}/icon".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
289
+
290
+ # query parameters
291
+ query_params = {}
292
+
293
+ # header parameters
294
+ header_params = {}
295
+
296
+ # HTTP header 'Accept' (if needed)
297
+ local_header_accept = []
298
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
299
+
300
+ # HTTP header 'Content-Type'
301
+ local_header_content_type = ['multipart/form-data']
302
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
303
+
304
+ # form parameters
305
+ form_params = {}
306
+ form_params["image"] = image
307
+
308
+ # http body (model)
309
+ post_body = nil
310
+ auth_names = ['oauth2-code', 'oauth2-implicit']
311
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
312
+ :header_params => header_params,
313
+ :query_params => query_params,
314
+ :form_params => form_params,
315
+ :body => post_body,
316
+ :auth_names => auth_names)
317
+ if @api_client.config.debugging
318
+ @api_client.config.logger.debug "API called: UserApi#update_user_icon\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
319
+ end
320
+ return data, status_code, headers
321
+ end
322
+
323
+ #
324
+ # Update user profile photo.
325
+ # @param id_or_name numeric user id or user name
326
+ # @param image The image data to update, you need to send with multipart/form-data.
327
+ # @param [Hash] opts the optional parameters
328
+ # @return [nil]
329
+ def update_user_photo(id_or_name, image, opts = {})
330
+ update_user_photo_with_http_info(id_or_name, image, opts)
331
+ return nil
332
+ end
333
+
334
+ #
335
+ # Update user profile photo.
336
+ # @param id_or_name numeric user id or user name
337
+ # @param image The image data to update, you need to send with multipart/form-data.
338
+ # @param [Hash] opts the optional parameters
339
+ # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
340
+ def update_user_photo_with_http_info(id_or_name, image, opts = {})
341
+ if @api_client.config.debugging
342
+ @api_client.config.logger.debug "Calling API: UserApi.update_user_photo ..."
343
+ end
344
+ # verify the required parameter 'id_or_name' is set
345
+ fail ArgumentError, "Missing the required parameter 'id_or_name' when calling UserApi.update_user_photo" if id_or_name.nil?
346
+ # verify the required parameter 'image' is set
347
+ fail ArgumentError, "Missing the required parameter 'image' when calling UserApi.update_user_photo" if image.nil?
348
+ # resource path
349
+ local_var_path = "/user/{id_or_name}/photo".sub('{format}','json').sub('{' + 'id_or_name' + '}', id_or_name.to_s)
350
+
351
+ # query parameters
352
+ query_params = {}
353
+
354
+ # header parameters
355
+ header_params = {}
356
+
357
+ # HTTP header 'Accept' (if needed)
358
+ local_header_accept = []
359
+ local_header_accept_result = @api_client.select_header_accept(local_header_accept) and header_params['Accept'] = local_header_accept_result
360
+
361
+ # HTTP header 'Content-Type'
362
+ local_header_content_type = ['multipart/form-data']
363
+ header_params['Content-Type'] = @api_client.select_header_content_type(local_header_content_type)
364
+
365
+ # form parameters
366
+ form_params = {}
367
+ form_params["image"] = image
368
+
369
+ # http body (model)
370
+ post_body = nil
371
+ auth_names = ['oauth2-code', 'oauth2-implicit']
372
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path,
373
+ :header_params => header_params,
374
+ :query_params => query_params,
375
+ :form_params => form_params,
376
+ :body => post_body,
377
+ :auth_names => auth_names)
378
+ if @api_client.config.debugging
379
+ @api_client.config.logger.debug "API called: UserApi#update_user_photo\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
380
+ end
381
+ return data, status_code, headers
382
+ end
90
383
  end
91
384
  end
@@ -3,7 +3,7 @@
3
3
 
4
4
  #OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.net/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.net/projects/osdn-codes/releases/p14859 .
5
5
 
6
- OpenAPI spec version: 0.0.20161003
6
+ OpenAPI spec version: 0.0.20171120
7
7
  Contact: admin@osdn.net
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.net/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.net/projects/osdn-codes/releases/p14859 .
5
5
 
6
- OpenAPI spec version: 0.0.20161003
6
+ OpenAPI spec version: 0.0.20171120
7
7
  Contact: admin@osdn.net
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -3,7 +3,7 @@
3
3
 
4
4
  #OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.net/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.net/projects/osdn-codes/releases/p14859 .
5
5
 
6
- OpenAPI spec version: 0.0.20161003
6
+ OpenAPI spec version: 0.0.20171120
7
7
  Contact: admin@osdn.net
8
8
  Generated by: https://github.com/swagger-api/swagger-codegen.git
9
9
 
@@ -0,0 +1,208 @@
1
+ =begin
2
+ #OSDN REST API v0 beta
3
+
4
+ #OSDN REST API. Currently this API is experimental release. Pelase refer documentation on https://osdn.net/projects/osdn-codes/wiki/APIGuide and you can get client libraries from https://osdn.net/projects/osdn-codes/releases/p14859 .
5
+
6
+ OpenAPI spec version: 0.0.20171120
7
+ Contact: admin@osdn.net
8
+ Generated by: https://github.com/swagger-api/swagger-codegen.git
9
+
10
+ Licensed under the Apache License, Version 2.0 (the "License");
11
+ you may not use this file except in compliance with the License.
12
+ You may obtain a copy of the License at
13
+
14
+ http://www.apache.org/licenses/LICENSE-2.0
15
+
16
+ Unless required by applicable law or agreed to in writing, software
17
+ distributed under the License is distributed on an "AS IS" BASIS,
18
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
+ See the License for the specific language governing permissions and
20
+ limitations under the License.
21
+
22
+ =end
23
+
24
+ require 'date'
25
+
26
+ module OSDNClient
27
+
28
+ class FrsAdminPrefs
29
+ attr_accessor :group_id
30
+
31
+ attr_accessor :allow_overwrite
32
+
33
+
34
+ # Attribute mapping from ruby-style variable name to JSON key.
35
+ def self.attribute_map
36
+ {
37
+ :'group_id' => :'group_id',
38
+ :'allow_overwrite' => :'allow_overwrite'
39
+ }
40
+ end
41
+
42
+ # Attribute type mapping.
43
+ def self.swagger_types
44
+ {
45
+ :'group_id' => :'Integer',
46
+ :'allow_overwrite' => :'BOOLEAN'
47
+ }
48
+ end
49
+
50
+ # Initializes the object
51
+ # @param [Hash] attributes Model attributes in the form of hash
52
+ def initialize(attributes = {})
53
+ return unless attributes.is_a?(Hash)
54
+
55
+ # convert string to symbol for hash key
56
+ attributes = attributes.each_with_object({}){|(k,v), h| h[k.to_sym] = v}
57
+
58
+ if attributes.has_key?(:'group_id')
59
+ self.group_id = attributes[:'group_id']
60
+ end
61
+
62
+ if attributes.has_key?(:'allow_overwrite')
63
+ self.allow_overwrite = attributes[:'allow_overwrite']
64
+ end
65
+
66
+ end
67
+
68
+ # Show invalid properties with the reasons. Usually used together with valid?
69
+ # @return Array for valid properies with the reasons
70
+ def list_invalid_properties
71
+ invalid_properties = Array.new
72
+ return invalid_properties
73
+ end
74
+
75
+ # Check to see if the all the properties in the model are valid
76
+ # @return true if the model is valid
77
+ def valid?
78
+ return true
79
+ end
80
+
81
+ # Checks equality by comparing each attribute.
82
+ # @param [Object] Object to be compared
83
+ def ==(o)
84
+ return true if self.equal?(o)
85
+ self.class == o.class &&
86
+ group_id == o.group_id &&
87
+ allow_overwrite == o.allow_overwrite
88
+ end
89
+
90
+ # @see the `==` method
91
+ # @param [Object] Object to be compared
92
+ def eql?(o)
93
+ self == o
94
+ end
95
+
96
+ # Calculates hash code according to all attributes.
97
+ # @return [Fixnum] Hash code
98
+ def hash
99
+ [group_id, allow_overwrite].hash
100
+ end
101
+
102
+ # Builds the object from hash
103
+ # @param [Hash] attributes Model attributes in the form of hash
104
+ # @return [Object] Returns the model itself
105
+ def build_from_hash(attributes)
106
+ return nil unless attributes.is_a?(Hash)
107
+ self.class.swagger_types.each_pair do |key, type|
108
+ if type =~ /^Array<(.*)>/i
109
+ # check to ensure the input is an array given that the the attribute
110
+ # is documented as an array but the input is not
111
+ if attributes[self.class.attribute_map[key]].is_a?(Array)
112
+ self.send("#{key}=", attributes[self.class.attribute_map[key]].map{ |v| _deserialize($1, v) } )
113
+ end
114
+ elsif !attributes[self.class.attribute_map[key]].nil?
115
+ self.send("#{key}=", _deserialize(type, attributes[self.class.attribute_map[key]]))
116
+ end # or else data not found in attributes(hash), not an issue as the data can be optional
117
+ end
118
+
119
+ self
120
+ end
121
+
122
+ # Deserializes the data based on type
123
+ # @param string type Data type
124
+ # @param string value Value to be deserialized
125
+ # @return [Object] Deserialized data
126
+ def _deserialize(type, value)
127
+ case type.to_sym
128
+ when :DateTime
129
+ DateTime.parse(value)
130
+ when :Date
131
+ Date.parse(value)
132
+ when :String
133
+ value.to_s
134
+ when :Integer
135
+ value.to_i
136
+ when :Float
137
+ value.to_f
138
+ when :BOOLEAN
139
+ if value.to_s =~ /^(true|t|yes|y|1)$/i
140
+ true
141
+ else
142
+ false
143
+ end
144
+ when :Object
145
+ # generic object (usually a Hash), return directly
146
+ value
147
+ when /\AArray<(?<inner_type>.+)>\z/
148
+ inner_type = Regexp.last_match[:inner_type]
149
+ value.map { |v| _deserialize(inner_type, v) }
150
+ when /\AHash<(?<k_type>.+), (?<v_type>.+)>\z/
151
+ k_type = Regexp.last_match[:k_type]
152
+ v_type = Regexp.last_match[:v_type]
153
+ {}.tap do |hash|
154
+ value.each do |k, v|
155
+ hash[_deserialize(k_type, k)] = _deserialize(v_type, v)
156
+ end
157
+ end
158
+ else # model
159
+ temp_model = OSDNClient.const_get(type).new
160
+ temp_model.build_from_hash(value)
161
+ end
162
+ end
163
+
164
+ # Returns the string representation of the object
165
+ # @return [String] String presentation of the object
166
+ def to_s
167
+ to_hash.to_s
168
+ end
169
+
170
+ # to_body is an alias to to_hash (backward compatibility)
171
+ # @return [Hash] Returns the object in the form of hash
172
+ def to_body
173
+ to_hash
174
+ end
175
+
176
+ # Returns the object in the form of hash
177
+ # @return [Hash] Returns the object in the form of hash
178
+ def to_hash
179
+ hash = {}
180
+ self.class.attribute_map.each_pair do |attr, param|
181
+ value = self.send(attr)
182
+ next if value.nil?
183
+ hash[param] = _to_hash(value)
184
+ end
185
+ hash
186
+ end
187
+
188
+ # Outputs non-array value in the form of hash
189
+ # For object, use to_hash. Otherwise, just return the value
190
+ # @param [Object] value Any valid value
191
+ # @return [Hash] Returns the value in the form of hash
192
+ def _to_hash(value)
193
+ if value.is_a?(Array)
194
+ value.compact.map{ |v| _to_hash(v) }
195
+ elsif value.is_a?(Hash)
196
+ {}.tap do |hash|
197
+ value.each { |k, v| hash[k] = _to_hash(v) }
198
+ end
199
+ elsif value.respond_to? :to_hash
200
+ value.to_hash
201
+ else
202
+ value
203
+ end
204
+ end
205
+
206
+ end
207
+
208
+ end