flat_api 0.1.2 → 0.3.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (409) hide show
  1. checksums.yaml +5 -5
  2. data/lib/flat_api/api/account_api.rb +31 -21
  3. data/lib/flat_api/api/class_api.rb +1405 -405
  4. data/lib/flat_api/api/collection_api.rb +684 -0
  5. data/lib/flat_api/api/edu_resources_api.rb +851 -0
  6. data/lib/flat_api/api/group_api.rb +81 -55
  7. data/lib/flat_api/api/organization_api.rb +524 -180
  8. data/lib/flat_api/api/score_api.rb +1034 -570
  9. data/lib/flat_api/api/task_api.rb +85 -0
  10. data/lib/flat_api/api/user_api.rb +114 -76
  11. data/lib/flat_api/api_client.rb +112 -107
  12. data/lib/flat_api/api_error.rb +24 -4
  13. data/lib/flat_api/configuration.rb +105 -16
  14. data/lib/flat_api/models/api_access_token.rb +268 -0
  15. data/lib/flat_api/models/app_scopes.rb +59 -0
  16. data/lib/flat_api/models/assignment.rb +192 -101
  17. data/lib/flat_api/models/assignment_capabilities.rb +283 -0
  18. data/lib/flat_api/models/assignment_capabilities_can_publish_in_class_error.rb +240 -0
  19. data/lib/flat_api/models/assignment_copy.rb +80 -169
  20. data/lib/flat_api/models/assignment_copy_response.rb +430 -0
  21. data/lib/flat_api/models/assignment_copy_to_class.rb +243 -0
  22. data/lib/flat_api/models/assignment_copy_to_resource_library.rb +233 -0
  23. data/lib/flat_api/models/assignment_submission.rb +249 -66
  24. data/lib/flat_api/models/assignment_submission_comment.rb +276 -0
  25. data/lib/flat_api/models/assignment_submission_comment_creation.rb +223 -0
  26. data/lib/flat_api/models/assignment_submission_comments.rb +225 -0
  27. data/lib/flat_api/models/assignment_submission_history.rb +384 -0
  28. data/lib/flat_api/models/assignment_submission_history_attachment.rb +235 -0
  29. data/lib/flat_api/models/assignment_submission_history_state.rb +43 -0
  30. data/lib/flat_api/models/assignment_submission_lti.rb +222 -0
  31. data/lib/flat_api/models/assignment_submission_playback_inner.rb +240 -0
  32. data/lib/flat_api/models/assignment_submission_state.rb +42 -0
  33. data/lib/flat_api/models/assignment_submission_update.rb +150 -50
  34. data/lib/flat_api/models/assignment_type.rb +44 -0
  35. data/lib/flat_api/models/assignment_update.rb +407 -0
  36. data/lib/flat_api/models/class_assignment.rb +613 -0
  37. data/lib/flat_api/models/class_assignment_all_of_canvas.rb +226 -0
  38. data/lib/flat_api/models/class_assignment_all_of_lti.rb +216 -0
  39. data/lib/flat_api/models/class_assignment_all_of_mfc.rb +226 -0
  40. data/lib/flat_api/models/class_assignment_update.rb +509 -0
  41. data/lib/flat_api/models/class_assignment_update_all_of_google_classroom.rb +217 -0
  42. data/lib/flat_api/models/class_assignment_update_all_of_microsoft_graph.rb +219 -0
  43. data/lib/flat_api/models/class_attachment_creation.rb +110 -41
  44. data/lib/flat_api/models/class_creation.rb +144 -43
  45. data/lib/flat_api/models/class_details.rb +175 -60
  46. data/lib/flat_api/models/class_details_canvas.rb +61 -34
  47. data/lib/flat_api/models/class_details_clever.rb +76 -48
  48. data/lib/flat_api/models/class_details_google_classroom.rb +66 -59
  49. data/lib/flat_api/models/class_details_google_drive.rb +63 -36
  50. data/lib/flat_api/models/class_details_issues.rb +218 -0
  51. data/lib/flat_api/models/class_details_issues_sync_inner.rb +270 -0
  52. data/lib/flat_api/models/class_details_lti.rb +65 -38
  53. data/lib/flat_api/models/class_details_mfc.rb +226 -0
  54. data/lib/flat_api/models/class_details_microsoft_graph.rb +215 -0
  55. data/lib/flat_api/models/class_grade_level.rb +43 -0
  56. data/lib/flat_api/models/class_roles.rb +18 -9
  57. data/lib/flat_api/models/class_state.rb +18 -9
  58. data/lib/flat_api/models/class_update.rb +144 -42
  59. data/lib/flat_api/models/collection.rb +373 -0
  60. data/lib/flat_api/models/collection_app.rb +236 -0
  61. data/lib/flat_api/models/collection_capabilities.rb +291 -0
  62. data/lib/flat_api/models/collection_creation.rb +288 -0
  63. data/lib/flat_api/models/collection_modification.rb +275 -0
  64. data/lib/flat_api/models/collection_privacy.rb +39 -0
  65. data/lib/flat_api/models/collection_type.rb +44 -0
  66. data/lib/flat_api/models/edu_library.rb +292 -0
  67. data/lib/flat_api/models/edu_resource.rb +366 -0
  68. data/lib/flat_api/models/edu_resource_capabilities.rb +236 -0
  69. data/lib/flat_api/models/edu_resource_copy.rb +223 -0
  70. data/lib/flat_api/models/edu_resource_creation.rb +301 -0
  71. data/lib/flat_api/models/edu_resource_folder.rb +216 -0
  72. data/lib/flat_api/models/edu_resource_lti_link.rb +223 -0
  73. data/lib/flat_api/models/edu_resource_move.rb +223 -0
  74. data/lib/flat_api/models/edu_resource_privacy.rb +41 -0
  75. data/lib/flat_api/models/edu_resource_resource.rb +105 -0
  76. data/lib/flat_api/models/edu_resource_type.rb +40 -0
  77. data/lib/flat_api/models/edu_resource_update.rb +277 -0
  78. data/lib/flat_api/models/edu_resource_use_in_class.rb +233 -0
  79. data/lib/flat_api/models/flat_error_response.rb +79 -38
  80. data/lib/flat_api/models/flat_locales.rb +30 -10
  81. data/lib/flat_api/models/google_classroom_coursework.rb +76 -38
  82. data/lib/flat_api/models/google_classroom_submission.rb +84 -36
  83. data/lib/flat_api/models/group.rb +72 -44
  84. data/lib/flat_api/models/group_details.rb +92 -43
  85. data/lib/flat_api/models/group_type.rb +18 -9
  86. data/lib/flat_api/models/license_mode.rb +18 -9
  87. data/lib/flat_api/models/license_sources.rb +21 -9
  88. data/lib/flat_api/models/lms_name.rb +19 -9
  89. data/lib/flat_api/models/lti_credentials.rb +95 -46
  90. data/lib/flat_api/models/lti_credentials_creation.rb +91 -38
  91. data/lib/flat_api/models/media_attachment.rb +167 -70
  92. data/lib/flat_api/models/media_score_sharing_mode.rb +19 -9
  93. data/lib/flat_api/models/microsoft_graph_assignment.rb +248 -0
  94. data/lib/flat_api/models/microsoft_graph_submission.rb +240 -0
  95. data/lib/flat_api/models/organization_invitation.rb +139 -44
  96. data/lib/flat_api/models/organization_invitation_creation.rb +99 -35
  97. data/lib/flat_api/models/organization_roles.rb +18 -9
  98. data/lib/flat_api/models/organization_user_access_token_creation.rb +225 -0
  99. data/lib/flat_api/models/resource_collaborator.rb +403 -0
  100. data/lib/flat_api/models/{score_collaborator_creation.rb → resource_collaborator_creation.rb} +85 -48
  101. data/lib/flat_api/models/resource_rights.rb +318 -0
  102. data/lib/flat_api/models/score_comment.rb +93 -56
  103. data/lib/flat_api/models/score_comment_context.rb +103 -59
  104. data/lib/flat_api/models/score_comment_creation.rb +70 -41
  105. data/lib/flat_api/models/score_comment_moderation.rb +260 -0
  106. data/lib/flat_api/models/score_comment_update.rb +82 -49
  107. data/lib/flat_api/models/score_comments_counts.rb +67 -40
  108. data/lib/flat_api/models/score_creation.rb +81 -215
  109. data/lib/flat_api/models/score_creation_builder_data.rb +298 -0
  110. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data.rb +230 -0
  111. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.rb +322 -0
  112. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.rb +274 -0
  113. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.rb +269 -0
  114. data/lib/flat_api/models/score_creation_common.rb +268 -0
  115. data/lib/flat_api/models/score_creation_file_import.rb +324 -0
  116. data/lib/flat_api/models/score_creation_google_drive_import.rb +291 -0
  117. data/lib/flat_api/models/score_creation_type.rb +19 -9
  118. data/lib/flat_api/models/score_details.rb +274 -83
  119. data/lib/flat_api/models/score_fork.rb +94 -32
  120. data/lib/flat_api/models/score_license.rb +19 -9
  121. data/lib/flat_api/models/score_likes_counts.rb +83 -35
  122. data/lib/flat_api/models/score_modification.rb +175 -52
  123. data/lib/flat_api/models/score_plays_counts.rb +236 -0
  124. data/lib/flat_api/models/score_privacy.rb +18 -9
  125. data/lib/flat_api/models/score_revision.rb +80 -43
  126. data/lib/flat_api/models/score_revision_creation.rb +105 -40
  127. data/lib/flat_api/models/score_revision_statistics.rb +83 -36
  128. data/lib/flat_api/models/score_source.rb +61 -35
  129. data/lib/flat_api/models/score_summary.rb +124 -40
  130. data/lib/flat_api/models/score_track.rb +172 -51
  131. data/lib/flat_api/models/score_track_creation.rb +101 -39
  132. data/lib/flat_api/models/score_track_point.rb +70 -38
  133. data/lib/flat_api/models/score_track_purpose.rb +40 -0
  134. data/lib/flat_api/models/score_track_state.rb +18 -9
  135. data/lib/flat_api/models/score_track_type.rb +18 -9
  136. data/lib/flat_api/models/score_track_update.rb +88 -37
  137. data/lib/flat_api/models/score_views_counts.rb +62 -35
  138. data/lib/flat_api/models/task.rb +364 -0
  139. data/lib/flat_api/models/task_export_options.rb +218 -0
  140. data/lib/flat_api/models/task_progress.rb +226 -0
  141. data/lib/flat_api/models/task_result.rb +226 -0
  142. data/lib/flat_api/models/tutteo_product.rb +42 -0
  143. data/lib/flat_api/models/user_admin_update.rb +219 -41
  144. data/lib/flat_api/models/user_azure_details.rb +235 -0
  145. data/lib/flat_api/models/user_basics.rb +187 -55
  146. data/lib/flat_api/models/user_community_profile_links.rb +272 -0
  147. data/lib/flat_api/models/user_creation.rb +215 -49
  148. data/lib/flat_api/models/user_details.rb +258 -93
  149. data/lib/flat_api/models/user_details_admin.rb +220 -68
  150. data/lib/flat_api/models/user_details_admin_all_of_license.rb +278 -0
  151. data/lib/flat_api/models/user_public.rb +242 -79
  152. data/lib/flat_api/models/user_public_summary.rb +201 -61
  153. data/lib/flat_api/models/user_signin_link.rb +225 -0
  154. data/lib/flat_api/models/user_signin_link_creation.rb +217 -0
  155. data/lib/flat_api/version.rb +5 -5
  156. data/lib/flat_api.rb +87 -15
  157. data/spec/api/account_api_spec.rb +11 -10
  158. data/spec/api/class_api_spec.rb +212 -68
  159. data/spec/api/collection_api_spec.rb +158 -0
  160. data/spec/api/edu_resources_api_spec.rb +181 -0
  161. data/spec/api/group_api_spec.rb +14 -15
  162. data/spec/api/organization_api_spec.rb +78 -39
  163. data/spec/api/score_api_spec.rb +139 -110
  164. data/spec/api/task_api_spec.rb +47 -0
  165. data/spec/api/user_api_spec.rb +28 -26
  166. data/spec/models/api_access_token_spec.rb +66 -0
  167. data/spec/models/app_scopes_spec.rb +30 -0
  168. data/spec/models/assignment_capabilities_can_publish_in_class_error_spec.rb +42 -0
  169. data/spec/models/assignment_capabilities_spec.rb +60 -0
  170. data/spec/models/assignment_copy_response_spec.rb +124 -0
  171. data/spec/models/assignment_copy_spec.rb +13 -23
  172. data/spec/models/assignment_copy_to_class_spec.rb +48 -0
  173. data/spec/models/assignment_copy_to_resource_library_spec.rb +42 -0
  174. data/spec/models/assignment_spec.rb +51 -39
  175. data/spec/models/assignment_submission_comment_creation_spec.rb +36 -0
  176. data/spec/models/assignment_submission_comment_spec.rb +72 -0
  177. data/spec/models/assignment_submission_comments_spec.rb +42 -0
  178. data/spec/models/assignment_submission_history_attachment_spec.rb +48 -0
  179. data/spec/models/assignment_submission_history_spec.rb +112 -0
  180. data/spec/models/assignment_submission_history_state_spec.rb +30 -0
  181. data/spec/models/assignment_submission_lti_spec.rb +36 -0
  182. data/spec/models/assignment_submission_playback_inner_spec.rb +42 -0
  183. data/spec/models/assignment_submission_spec.rb +68 -32
  184. data/spec/models/assignment_submission_state_spec.rb +30 -0
  185. data/spec/models/assignment_submission_update_spec.rb +29 -23
  186. data/spec/models/assignment_type_spec.rb +30 -0
  187. data/spec/models/assignment_update_spec.rb +100 -0
  188. data/spec/models/class_assignment_all_of_canvas_spec.rb +42 -0
  189. data/spec/models/class_assignment_all_of_lti_spec.rb +36 -0
  190. data/spec/models/class_assignment_all_of_mfc_spec.rb +42 -0
  191. data/spec/models/class_assignment_spec.rb +216 -0
  192. data/spec/models/class_assignment_update_all_of_google_classroom_spec.rb +36 -0
  193. data/spec/models/class_assignment_update_all_of_microsoft_graph_spec.rb +36 -0
  194. data/spec/models/class_assignment_update_spec.rb +150 -0
  195. data/spec/models/class_attachment_creation_spec.rb +41 -23
  196. data/spec/models/class_creation_spec.rb +34 -18
  197. data/spec/models/class_details_canvas_spec.rb +12 -18
  198. data/spec/models/class_details_clever_spec.rb +21 -27
  199. data/spec/models/class_details_google_classroom_spec.rb +12 -30
  200. data/spec/models/class_details_google_drive_spec.rb +12 -18
  201. data/spec/models/class_details_issues_spec.rb +36 -0
  202. data/spec/models/class_details_issues_sync_inner_spec.rb +52 -0
  203. data/spec/models/class_details_lti_spec.rb +13 -19
  204. data/spec/models/class_details_mfc_spec.rb +42 -0
  205. data/spec/models/class_details_microsoft_graph_spec.rb +36 -0
  206. data/spec/models/class_details_spec.rb +68 -34
  207. data/spec/models/class_grade_level_spec.rb +30 -0
  208. data/spec/models/class_roles_spec.rb +10 -16
  209. data/spec/models/class_state_spec.rb +10 -16
  210. data/spec/models/class_update_spec.rb +34 -18
  211. data/spec/models/collection_app_spec.rb +48 -0
  212. data/spec/models/collection_capabilities_spec.rb +60 -0
  213. data/spec/models/collection_creation_spec.rb +42 -0
  214. data/spec/models/collection_modification_spec.rb +42 -0
  215. data/spec/models/collection_privacy_spec.rb +30 -0
  216. data/spec/models/collection_spec.rb +114 -0
  217. data/spec/models/collection_type_spec.rb +30 -0
  218. data/spec/models/edu_library_spec.rb +62 -0
  219. data/spec/models/edu_resource_capabilities_spec.rb +48 -0
  220. data/spec/models/edu_resource_copy_spec.rb +36 -0
  221. data/spec/models/edu_resource_creation_spec.rb +48 -0
  222. data/spec/models/edu_resource_folder_spec.rb +36 -0
  223. data/spec/models/edu_resource_lti_link_spec.rb +36 -0
  224. data/spec/models/edu_resource_move_spec.rb +36 -0
  225. data/spec/models/edu_resource_privacy_spec.rb +30 -0
  226. data/spec/models/edu_resource_resource_spec.rb +32 -0
  227. data/spec/models/edu_resource_spec.rb +96 -0
  228. data/spec/models/edu_resource_type_spec.rb +30 -0
  229. data/spec/models/edu_resource_update_spec.rb +42 -0
  230. data/spec/models/edu_resource_use_in_class_spec.rb +42 -0
  231. data/spec/models/flat_error_response_spec.rb +14 -20
  232. data/spec/models/flat_locales_spec.rb +10 -16
  233. data/spec/models/google_classroom_coursework_spec.rb +19 -19
  234. data/spec/models/google_classroom_submission_spec.rb +13 -19
  235. data/spec/models/group_details_spec.rb +17 -23
  236. data/spec/models/group_spec.rb +21 -27
  237. data/spec/models/group_type_spec.rb +10 -16
  238. data/spec/models/license_mode_spec.rb +10 -16
  239. data/spec/models/license_sources_spec.rb +10 -16
  240. data/spec/models/lms_name_spec.rb +10 -16
  241. data/spec/models/lti_credentials_creation_spec.rb +12 -18
  242. data/spec/models/lti_credentials_spec.rb +19 -25
  243. data/spec/models/media_attachment_spec.rb +67 -37
  244. data/spec/models/media_score_sharing_mode_spec.rb +10 -16
  245. data/spec/models/microsoft_graph_assignment_spec.rb +54 -0
  246. data/spec/models/microsoft_graph_submission_spec.rb +42 -0
  247. data/spec/models/organization_invitation_creation_spec.rb +16 -18
  248. data/spec/models/organization_invitation_spec.rb +29 -23
  249. data/spec/models/organization_roles_spec.rb +10 -16
  250. data/spec/models/organization_user_access_token_creation_spec.rb +36 -0
  251. data/spec/models/resource_collaborator_creation_spec.rb +72 -0
  252. data/spec/models/resource_collaborator_spec.rb +112 -0
  253. data/spec/models/resource_rights_spec.rb +64 -0
  254. data/spec/models/score_comment_context_spec.rb +23 -23
  255. data/spec/models/score_comment_creation_spec.rb +16 -22
  256. data/spec/models/score_comment_moderation_spec.rb +46 -0
  257. data/spec/models/score_comment_spec.rb +35 -35
  258. data/spec/models/score_comment_update_spec.rb +14 -20
  259. data/spec/models/score_comments_counts_spec.rb +14 -20
  260. data/spec/models/score_creation_builder_data_all_of_builder_data_layout_data_spec.rb +82 -0
  261. data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_instruments_spec.rb +60 -0
  262. data/spec/models/score_creation_builder_data_all_of_builder_data_score_data_spec.rb +66 -0
  263. data/spec/models/score_creation_builder_data_all_of_builder_data_spec.rb +42 -0
  264. data/spec/models/score_creation_builder_data_spec.rb +60 -0
  265. data/spec/models/score_creation_common_spec.rb +54 -0
  266. data/spec/models/score_creation_file_import_spec.rb +76 -0
  267. data/spec/models/score_creation_google_drive_import_spec.rb +60 -0
  268. data/spec/models/score_creation_spec.rb +12 -52
  269. data/spec/models/score_creation_type_spec.rb +10 -16
  270. data/spec/models/score_details_spec.rb +75 -45
  271. data/spec/models/score_fork_spec.rb +27 -15
  272. data/spec/models/score_license_spec.rb +10 -16
  273. data/spec/models/score_likes_counts_spec.rb +13 -19
  274. data/spec/models/score_modification_spec.rb +51 -21
  275. data/spec/models/score_plays_counts_spec.rb +48 -0
  276. data/spec/models/score_privacy_spec.rb +10 -16
  277. data/spec/models/score_revision_creation_spec.rb +18 -20
  278. data/spec/models/score_revision_spec.rb +23 -23
  279. data/spec/models/score_revision_statistics_spec.rb +24 -18
  280. data/spec/models/score_source_spec.rb +11 -17
  281. data/spec/models/score_summary_spec.rb +16 -22
  282. data/spec/models/score_track_creation_spec.rb +21 -21
  283. data/spec/models/score_track_point_spec.rb +17 -23
  284. data/spec/models/score_track_purpose_spec.rb +30 -0
  285. data/spec/models/score_track_spec.rb +28 -28
  286. data/spec/models/score_track_state_spec.rb +10 -16
  287. data/spec/models/score_track_type_spec.rb +10 -16
  288. data/spec/models/score_track_update_spec.rb +14 -20
  289. data/spec/models/score_views_counts_spec.rb +13 -19
  290. data/spec/models/task_export_options_spec.rb +36 -0
  291. data/spec/models/task_progress_spec.rb +42 -0
  292. data/spec/models/task_result_spec.rb +42 -0
  293. data/spec/models/task_spec.rb +100 -0
  294. data/spec/models/tutteo_product_spec.rb +30 -0
  295. data/spec/models/user_admin_update_spec.rb +36 -18
  296. data/spec/models/user_azure_details_spec.rb +48 -0
  297. data/spec/models/user_basics_spec.rb +47 -25
  298. data/spec/models/user_community_profile_links_spec.rb +66 -0
  299. data/spec/models/user_creation_spec.rb +36 -20
  300. data/spec/models/user_details_admin_all_of_license_spec.rb +60 -0
  301. data/spec/models/user_details_admin_spec.rb +60 -32
  302. data/spec/models/user_details_spec.rb +93 -45
  303. data/spec/models/user_public_spec.rb +71 -37
  304. data/spec/models/user_public_summary_spec.rb +51 -29
  305. data/spec/models/user_signin_link_creation_spec.rb +36 -0
  306. data/spec/models/user_signin_link_spec.rb +42 -0
  307. data/spec/spec_helper.rb +4 -4
  308. metadata +299 -312
  309. data/CHANGELOG.md +0 -13
  310. data/Gemfile +0 -7
  311. data/README.md +0 -249
  312. data/Rakefile +0 -8
  313. data/docs/AccountApi.md +0 -55
  314. data/docs/Assignment.md +0 -18
  315. data/docs/AssignmentCopy.md +0 -8
  316. data/docs/AssignmentCreation.md +0 -12
  317. data/docs/AssignmentSubmission.md +0 -19
  318. data/docs/AssignmentSubmissionUpdate.md +0 -11
  319. data/docs/ClassApi.md +0 -1051
  320. data/docs/ClassAttachmentCreation.md +0 -10
  321. data/docs/ClassCreation.md +0 -9
  322. data/docs/ClassDetails.md +0 -25
  323. data/docs/ClassDetailsCanvas.md +0 -9
  324. data/docs/ClassDetailsClever.md +0 -14
  325. data/docs/ClassDetailsGoogleClassroom.md +0 -11
  326. data/docs/ClassDetailsGoogleDrive.md +0 -9
  327. data/docs/ClassDetailsLti.md +0 -10
  328. data/docs/ClassRoles.md +0 -7
  329. data/docs/ClassState.md +0 -7
  330. data/docs/ClassUpdate.md +0 -9
  331. data/docs/FlatErrorResponse.md +0 -11
  332. data/docs/FlatLocales.md +0 -7
  333. data/docs/GoogleClassroomCoursework.md +0 -10
  334. data/docs/GoogleClassroomSubmission.md +0 -10
  335. data/docs/Group.md +0 -14
  336. data/docs/GroupApi.md +0 -167
  337. data/docs/GroupDetails.md +0 -14
  338. data/docs/GroupType.md +0 -7
  339. data/docs/LicenseMode.md +0 -7
  340. data/docs/LicenseSources.md +0 -7
  341. data/docs/LmsName.md +0 -7
  342. data/docs/LtiCredentials.md +0 -16
  343. data/docs/LtiCredentialsCreation.md +0 -9
  344. data/docs/MediaAttachment.md +0 -23
  345. data/docs/MediaScoreSharingMode.md +0 -7
  346. data/docs/OrganizationApi.md +0 -538
  347. data/docs/OrganizationInvitation.md +0 -14
  348. data/docs/OrganizationInvitationCreation.md +0 -9
  349. data/docs/OrganizationRoles.md +0 -7
  350. data/docs/ScoreApi.md +0 -1605
  351. data/docs/ScoreCollaborator.md +0 -15
  352. data/docs/ScoreCollaboratorCreation.md +0 -13
  353. data/docs/ScoreComment.md +0 -22
  354. data/docs/ScoreCommentContext.md +0 -14
  355. data/docs/ScoreCommentCreation.md +0 -13
  356. data/docs/ScoreCommentUpdate.md +0 -11
  357. data/docs/ScoreCommentsCounts.md +0 -11
  358. data/docs/ScoreCreation.md +0 -13
  359. data/docs/ScoreCreationType.md +0 -7
  360. data/docs/ScoreData.md +0 -7
  361. data/docs/ScoreDataEncoding.md +0 -7
  362. data/docs/ScoreDetails.md +0 -36
  363. data/docs/ScoreFork.md +0 -7
  364. data/docs/ScoreLicense.md +0 -7
  365. data/docs/ScoreLikesCounts.md +0 -10
  366. data/docs/ScoreModification.md +0 -13
  367. data/docs/ScorePrivacy.md +0 -7
  368. data/docs/ScoreRevision.md +0 -14
  369. data/docs/ScoreRevisionCreation.md +0 -11
  370. data/docs/ScoreRevisionStatistics.md +0 -9
  371. data/docs/ScoreRights.md +0 -10
  372. data/docs/ScoreSource.md +0 -8
  373. data/docs/ScoreSummary.md +0 -13
  374. data/docs/ScoreTrack.md +0 -19
  375. data/docs/ScoreTrackCreation.md +0 -12
  376. data/docs/ScoreTrackPoint.md +0 -10
  377. data/docs/ScoreTrackState.md +0 -7
  378. data/docs/ScoreTrackType.md +0 -7
  379. data/docs/ScoreTrackUpdate.md +0 -11
  380. data/docs/ScoreViewsCounts.md +0 -10
  381. data/docs/UserAdminUpdate.md +0 -9
  382. data/docs/UserApi.md +0 -173
  383. data/docs/UserBasics.md +0 -13
  384. data/docs/UserCreation.md +0 -11
  385. data/docs/UserDetails.md +0 -28
  386. data/docs/UserDetailsAdmin.md +0 -20
  387. data/docs/UserDetailsAdminLicense.md +0 -12
  388. data/docs/UserInstruments.md +0 -7
  389. data/docs/UserPublic.md +0 -25
  390. data/docs/UserPublicSummary.md +0 -17
  391. data/flat_api.gemspec +0 -48
  392. data/git_push.sh +0 -55
  393. data/lib/flat_api/models/assignment_creation.rb +0 -230
  394. data/lib/flat_api/models/score_collaborator.rb +0 -263
  395. data/lib/flat_api/models/score_data.rb +0 -179
  396. data/lib/flat_api/models/score_data_encoding.rb +0 -30
  397. data/lib/flat_api/models/score_rights.rb +0 -215
  398. data/lib/flat_api/models/user_details_admin_license.rb +0 -227
  399. data/lib/flat_api/models/user_instruments.rb +0 -179
  400. data/spec/api_client_spec.rb +0 -226
  401. data/spec/configuration_spec.rb +0 -42
  402. data/spec/models/assignment_creation_spec.rb +0 -66
  403. data/spec/models/score_collaborator_creation_spec.rb +0 -72
  404. data/spec/models/score_collaborator_spec.rb +0 -84
  405. data/spec/models/score_data_encoding_spec.rb +0 -36
  406. data/spec/models/score_data_spec.rb +0 -36
  407. data/spec/models/score_rights_spec.rb +0 -48
  408. data/spec/models/user_details_admin_license_spec.rb +0 -66
  409. data/spec/models/user_instruments_spec.rb +0 -36
@@ -1,16 +1,16 @@
1
1
  =begin
2
2
  #Flat API
3
3
 
4
- #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML or MIDI files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and interoduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
4
+ #The Flat API allows you to easily extend the abilities of the [Flat Platform](https://flat.io), with a wide range of use cases including the following: * Creating and importing new music scores using MusicXML, MIDI, Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar and MuseScore files * Browsing, updating, copying, exporting the user's scores (for example in MP3, WAV or MIDI) * Managing educational resources with Flat for Education: creating & updating the organization accounts, the classes, rosters and assignments. The Flat API is built on HTTP. Our API is RESTful It has predictable resource URLs. It returns HTTP response codes to indicate errors. It also accepts and returns JSON in the HTTP body. The [schema](/swagger.yaml) of this API follows the [OpenAPI Initiative (OAI) specification](https://www.openapis.org/), you can use and work with [compatible Swagger tools](http://swagger.io/open-source-integrations/). This API features Cross-Origin Resource Sharing (CORS) implemented in compliance with [W3C spec](https://www.w3.org/TR/cors/). You can use your favorite HTTP/REST library for your programming language to use Flat's API. This specification and reference is [available on Github](https://github.com/FlatIO/api-reference). Getting Started and learn more: * [API Overview and introduction](https://flat.io/developers/docs/api/) * [Authentication (Personal Access Tokens or OAuth2)](https://flat.io/developers/docs/api/authentication.html) * [SDKs](https://flat.io/developers/docs/api/sdks.html) * [Rate Limits](https://flat.io/developers/docs/api/rate-limits.html) * [Changelog](https://flat.io/developers/docs/api/changelog.html)
5
5
 
6
- OpenAPI spec version: 2.5.2
6
+ The version of the OpenAPI document: 2.20.0
7
7
  Contact: developers@flat.io
8
- Generated by: https://github.com/swagger-api/swagger-codegen.git
9
- Swagger Codegen version: 2.4.0-SNAPSHOT
8
+ Generated by: https://openapi-generator.tech
9
+ OpenAPI Generator version: 7.3.0
10
10
 
11
11
  =end
12
12
 
13
- require "uri"
13
+ require 'cgi'
14
14
 
15
15
  module FlatApi
16
16
  class ScoreApi
@@ -19,27 +19,26 @@ module FlatApi
19
19
  def initialize(api_client = ApiClient.default)
20
20
  @api_client = api_client
21
21
  end
22
-
23
22
  # Add a new collaborator
24
- # Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a document. - To add an existing Flat user to the document, specify its unique identifier in the `user` property. - To invite an external user to the document, specify its email in the `userEmail` property. - To add a Flat group to the document, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
25
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
26
- # @param body
23
+ # Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify its unique identifier in the `user` property. - To invite an external user to the resource, specify its email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
24
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
25
+ # @param body [ResourceCollaboratorCreation]
27
26
  # @param [Hash] opts the optional parameters
28
- # @return [ScoreCollaborator]
27
+ # @return [ResourceCollaborator]
29
28
  def add_score_collaborator(score, body, opts = {})
30
29
  data, _status_code, _headers = add_score_collaborator_with_http_info(score, body, opts)
31
- return data
30
+ data
32
31
  end
33
32
 
34
33
  # Add a new collaborator
35
- # Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a document. - To add an existing Flat user to the document, specify its unique identifier in the `user` property. - To invite an external user to the document, specify its email in the `userEmail` property. - To add a Flat group to the document, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
36
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
37
- # @param body
34
+ # Share a score with a single user or a group. This API call allows to add, invite and update the collaborators of a resource. - To add an existing Flat user to the resource, specify its unique identifier in the `user` property. - To invite an external user to the resource, specify its email in the `userEmail` property. - To add a Flat group to the resource, specify its unique identifier in the `group` property. - To update an existing collaborator, process the same request with different rights.
35
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. `ScoreDetails.id`) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with `drive-` (e.g. `drive-0B000000000`).
36
+ # @param body [ResourceCollaboratorCreation]
38
37
  # @param [Hash] opts the optional parameters
39
- # @return [Array<(ScoreCollaborator, Fixnum, Hash)>] ScoreCollaborator data, response status code and response headers
38
+ # @return [Array<(ResourceCollaborator, Integer, Hash)>] ResourceCollaborator data, response status code and response headers
40
39
  def add_score_collaborator_with_http_info(score, body, opts = {})
41
40
  if @api_client.config.debugging
42
- @api_client.config.logger.debug "Calling API: ScoreApi.add_score_collaborator ..."
41
+ @api_client.config.logger.debug 'Calling API: ScoreApi.add_score_collaborator ...'
43
42
  end
44
43
  # verify the required parameter 'score' is set
45
44
  if @api_client.config.client_side_validation && score.nil?
@@ -50,31 +49,44 @@ module FlatApi
50
49
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_collaborator"
51
50
  end
52
51
  # resource path
53
- local_var_path = "/scores/{score}/collaborators".sub('{' + 'score' + '}', score.to_s)
52
+ local_var_path = '/scores/{score}/collaborators'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
54
53
 
55
54
  # query parameters
56
- query_params = {}
55
+ query_params = opts[:query_params] || {}
57
56
 
58
57
  # header parameters
59
- header_params = {}
58
+ header_params = opts[:header_params] || {}
60
59
  # HTTP header 'Accept' (if needed)
61
60
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
62
61
  # HTTP header 'Content-Type'
63
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
62
+ content_type = @api_client.select_header_content_type(['application/json'])
63
+ if !content_type.nil?
64
+ header_params['Content-Type'] = content_type
65
+ end
64
66
 
65
67
  # form parameters
66
- form_params = {}
68
+ form_params = opts[:form_params] || {}
67
69
 
68
70
  # http body (model)
69
- post_body = @api_client.object_to_http_body(body)
70
- auth_names = ['OAuth2']
71
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
71
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
72
+
73
+ # return_type
74
+ return_type = opts[:debug_return_type] || 'ResourceCollaborator'
75
+
76
+ # auth_names
77
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
78
+
79
+ new_options = opts.merge(
80
+ :operation => :"ScoreApi.add_score_collaborator",
72
81
  :header_params => header_params,
73
82
  :query_params => query_params,
74
83
  :form_params => form_params,
75
84
  :body => post_body,
76
85
  :auth_names => auth_names,
77
- :return_type => 'ScoreCollaborator')
86
+ :return_type => return_type
87
+ )
88
+
89
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
78
90
  if @api_client.config.debugging
79
91
  @api_client.config.logger.debug "API called: ScoreApi#add_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
80
92
  end
@@ -83,24 +95,24 @@ module FlatApi
83
95
 
84
96
  # Add a new video or audio track to the score
85
97
  # Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo.
86
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
87
- # @param body
98
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
99
+ # @param body [ScoreTrackCreation]
88
100
  # @param [Hash] opts the optional parameters
89
101
  # @return [ScoreTrack]
90
102
  def add_score_track(score, body, opts = {})
91
103
  data, _status_code, _headers = add_score_track_with_http_info(score, body, opts)
92
- return data
104
+ data
93
105
  end
94
106
 
95
107
  # Add a new video or audio track to the score
96
108
  # Use this method to add new track to the score. This track can then be played on flat.io or in an embedded score. This API method support medias hosted on SoundCloud, YouTube and Vimeo.
97
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
98
- # @param body
109
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
110
+ # @param body [ScoreTrackCreation]
99
111
  # @param [Hash] opts the optional parameters
100
- # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
112
+ # @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
101
113
  def add_score_track_with_http_info(score, body, opts = {})
102
114
  if @api_client.config.debugging
103
- @api_client.config.logger.debug "Calling API: ScoreApi.add_score_track ..."
115
+ @api_client.config.logger.debug 'Calling API: ScoreApi.add_score_track ...'
104
116
  end
105
117
  # verify the required parameter 'score' is set
106
118
  if @api_client.config.client_side_validation && score.nil?
@@ -111,86 +123,202 @@ module FlatApi
111
123
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.add_score_track"
112
124
  end
113
125
  # resource path
114
- local_var_path = "/scores/{score}/tracks".sub('{' + 'score' + '}', score.to_s)
126
+ local_var_path = '/scores/{score}/tracks'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
115
127
 
116
128
  # query parameters
117
- query_params = {}
129
+ query_params = opts[:query_params] || {}
118
130
 
119
131
  # header parameters
120
- header_params = {}
132
+ header_params = opts[:header_params] || {}
121
133
  # HTTP header 'Accept' (if needed)
122
134
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
123
135
  # HTTP header 'Content-Type'
124
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
136
+ content_type = @api_client.select_header_content_type(['application/json'])
137
+ if !content_type.nil?
138
+ header_params['Content-Type'] = content_type
139
+ end
125
140
 
126
141
  # form parameters
127
- form_params = {}
142
+ form_params = opts[:form_params] || {}
128
143
 
129
144
  # http body (model)
130
- post_body = @api_client.object_to_http_body(body)
131
- auth_names = ['OAuth2']
132
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
145
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
146
+
147
+ # return_type
148
+ return_type = opts[:debug_return_type] || 'ScoreTrack'
149
+
150
+ # auth_names
151
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
152
+
153
+ new_options = opts.merge(
154
+ :operation => :"ScoreApi.add_score_track",
133
155
  :header_params => header_params,
134
156
  :query_params => query_params,
135
157
  :form_params => form_params,
136
158
  :body => post_body,
137
159
  :auth_names => auth_names,
138
- :return_type => 'ScoreTrack')
160
+ :return_type => return_type
161
+ )
162
+
163
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
139
164
  if @api_client.config.debugging
140
165
  @api_client.config.logger.debug "API called: ScoreApi#add_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
141
166
  end
142
167
  return data, status_code, headers
143
168
  end
144
169
 
170
+ # Create a new score export task
171
+ # Some of the exports of a score takes are longer to process than a simple API requests. Use this endpoint to launch a new export of one score hosted on Flat.
172
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
173
+ # @param revision [String] Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
174
+ # @param format [String] The format of the file that will be generated or the target service name where the file will be exported
175
+ # @param [Hash] opts the optional parameters
176
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
177
+ # @option opts [TaskExportOptions] :body
178
+ # @return [Task]
179
+ def create_export_task(score, revision, format, opts = {})
180
+ data, _status_code, _headers = create_export_task_with_http_info(score, revision, format, opts)
181
+ data
182
+ end
183
+
184
+ # Create a new score export task
185
+ # Some of the exports of a score takes are longer to process than a simple API requests. Use this endpoint to launch a new export of one score hosted on Flat.
186
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
187
+ # @param revision [String] Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
188
+ # @param format [String] The format of the file that will be generated or the target service name where the file will be exported
189
+ # @param [Hash] opts the optional parameters
190
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
191
+ # @option opts [TaskExportOptions] :body
192
+ # @return [Array<(Task, Integer, Hash)>] Task data, response status code and response headers
193
+ def create_export_task_with_http_info(score, revision, format, opts = {})
194
+ if @api_client.config.debugging
195
+ @api_client.config.logger.debug 'Calling API: ScoreApi.create_export_task ...'
196
+ end
197
+ # verify the required parameter 'score' is set
198
+ if @api_client.config.client_side_validation && score.nil?
199
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.create_export_task"
200
+ end
201
+ # verify the required parameter 'revision' is set
202
+ if @api_client.config.client_side_validation && revision.nil?
203
+ fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.create_export_task"
204
+ end
205
+ # verify the required parameter 'format' is set
206
+ if @api_client.config.client_side_validation && format.nil?
207
+ fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.create_export_task"
208
+ end
209
+ # verify enum value
210
+ allowable_values = ["mp3", "wav", "practicefirst"]
211
+ if @api_client.config.client_side_validation && !allowable_values.include?(format)
212
+ fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
213
+ end
214
+ # resource path
215
+ local_var_path = '/scores/{score}/revisions/{revision}/{format}/task'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'revision' + '}', CGI.escape(revision.to_s)).sub('{' + 'format' + '}', CGI.escape(format.to_s))
216
+
217
+ # query parameters
218
+ query_params = opts[:query_params] || {}
219
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
220
+
221
+ # header parameters
222
+ header_params = opts[:header_params] || {}
223
+ # HTTP header 'Accept' (if needed)
224
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
225
+ # HTTP header 'Content-Type'
226
+ content_type = @api_client.select_header_content_type(['application/json'])
227
+ if !content_type.nil?
228
+ header_params['Content-Type'] = content_type
229
+ end
230
+
231
+ # form parameters
232
+ form_params = opts[:form_params] || {}
233
+
234
+ # http body (model)
235
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(opts[:'body'])
236
+
237
+ # return_type
238
+ return_type = opts[:debug_return_type] || 'Task'
239
+
240
+ # auth_names
241
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
242
+
243
+ new_options = opts.merge(
244
+ :operation => :"ScoreApi.create_export_task",
245
+ :header_params => header_params,
246
+ :query_params => query_params,
247
+ :form_params => form_params,
248
+ :body => post_body,
249
+ :auth_names => auth_names,
250
+ :return_type => return_type
251
+ )
252
+
253
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
254
+ if @api_client.config.debugging
255
+ @api_client.config.logger.debug "API called: ScoreApi#create_export_task\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
256
+ end
257
+ return data, status_code, headers
258
+ end
259
+
145
260
  # Create a new score
146
- # Use this API method to **create a new music score in the current User account**. You will need a MusicXML 3 (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`) or a MIDI (`audio/midi`) file to create the new Flat document. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions/{revision}`). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups).
147
- # @param body
261
+ # Use this API method to **create a new music score in the current User account**. This API endpoints provides 3 ways to create scores: * `ScoreCreationBuilderData` : Create a blank score by providing the list of instruments to use. You can optionally customize the initial key signature, time signature, enable TABs, Chord grids, as well as the page layout. * `ScoreCreationFileImport`: Import an existing MusicXML 3 file (`vnd.recordare.musicxml` or `vnd.recordare.musicxml+xml`), a MIDI file (`audio/midi`), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * `ScoreCreationGoogleDriveImport`: Import an existing Google Drive file from the connected Google Drive account. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (`POST /v2/scores/{score}/revisions/{revision}`). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups). If no `collection` is specified, the API will create the score in the most appropriate collection. When using an OAuth2 access token or a personal token, the score will be automatically added to your dedicated app collection in the account (`/v2/collections/app`). If a `collection` is specified and this one has more public privacy settings than the score (e.g. `public` vs `private` for the score), the privacy settings of the created score will be adjusted to the collection ones. You can check the adjusted privacy settings in the returned score `privacy`, and optionally adjust these settings if needed using `PUT /scores/{score}`.
262
+ # @param body [ScoreCreation]
148
263
  # @param [Hash] opts the optional parameters
149
264
  # @return [ScoreDetails]
150
265
  def create_score(body, opts = {})
151
266
  data, _status_code, _headers = create_score_with_http_info(body, opts)
152
- return data
267
+ data
153
268
  end
154
269
 
155
270
  # Create a new score
156
- # Use this API method to **create a new music score in the current User account**. You will need a MusicXML 3 (&#x60;vnd.recordare.musicxml&#x60; or &#x60;vnd.recordare.musicxml+xml&#x60;) or a MIDI (&#x60;audio/midi&#x60;) file to create the new Flat document. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (&#x60;POST /v2/scores/{score}/revisions/{revision}&#x60;). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups).
157
- # @param body
271
+ # Use this API method to **create a new music score in the current User account**. This API endpoints provides 3 ways to create scores: * &#x60;ScoreCreationBuilderData&#x60; : Create a blank score by providing the list of instruments to use. You can optionally customize the initial key signature, time signature, enable TABs, Chord grids, as well as the page layout. * &#x60;ScoreCreationFileImport&#x60;: Import an existing MusicXML 3 file (&#x60;vnd.recordare.musicxml&#x60; or &#x60;vnd.recordare.musicxml+xml&#x60;), a MIDI file (&#x60;audio/midi&#x60;), Guitar Pro (GP3, GP4, GP5, GPX, GP), PowerTab, TuxGuitar, or MuseScore file to create the new Flat document. * &#x60;ScoreCreationGoogleDriveImport&#x60;: Import an existing Google Drive file from the connected Google Drive account. This API call will automatically create the first revision of the document, the score can be modified by the using our web application or by uploading a new revision of this file (&#x60;POST /v2/scores/{score}/revisions/{revision}&#x60;). The currently authenticated user will be granted owner of the file and will be able to add other collaborators (users and groups). If no &#x60;collection&#x60; is specified, the API will create the score in the most appropriate collection. When using an OAuth2 access token or a personal token, the score will be automatically added to your dedicated app collection in the account (&#x60;/v2/collections/app&#x60;). If a &#x60;collection&#x60; is specified and this one has more public privacy settings than the score (e.g. &#x60;public&#x60; vs &#x60;private&#x60; for the score), the privacy settings of the created score will be adjusted to the collection ones. You can check the adjusted privacy settings in the returned score &#x60;privacy&#x60;, and optionally adjust these settings if needed using &#x60;PUT /scores/{score}&#x60;.
272
+ # @param body [ScoreCreation]
158
273
  # @param [Hash] opts the optional parameters
159
- # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
274
+ # @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
160
275
  def create_score_with_http_info(body, opts = {})
161
276
  if @api_client.config.debugging
162
- @api_client.config.logger.debug "Calling API: ScoreApi.create_score ..."
277
+ @api_client.config.logger.debug 'Calling API: ScoreApi.create_score ...'
163
278
  end
164
279
  # verify the required parameter 'body' is set
165
280
  if @api_client.config.client_side_validation && body.nil?
166
281
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score"
167
282
  end
168
283
  # resource path
169
- local_var_path = "/scores"
284
+ local_var_path = '/scores'
170
285
 
171
286
  # query parameters
172
- query_params = {}
287
+ query_params = opts[:query_params] || {}
173
288
 
174
289
  # header parameters
175
- header_params = {}
290
+ header_params = opts[:header_params] || {}
176
291
  # HTTP header 'Accept' (if needed)
177
292
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
178
293
  # HTTP header 'Content-Type'
179
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
294
+ content_type = @api_client.select_header_content_type(['application/json'])
295
+ if !content_type.nil?
296
+ header_params['Content-Type'] = content_type
297
+ end
180
298
 
181
299
  # form parameters
182
- form_params = {}
300
+ form_params = opts[:form_params] || {}
183
301
 
184
302
  # http body (model)
185
- post_body = @api_client.object_to_http_body(body)
186
- auth_names = ['OAuth2']
187
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
303
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
304
+
305
+ # return_type
306
+ return_type = opts[:debug_return_type] || 'ScoreDetails'
307
+
308
+ # auth_names
309
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
310
+
311
+ new_options = opts.merge(
312
+ :operation => :"ScoreApi.create_score",
188
313
  :header_params => header_params,
189
314
  :query_params => query_params,
190
315
  :form_params => form_params,
191
316
  :body => post_body,
192
317
  :auth_names => auth_names,
193
- :return_type => 'ScoreDetails')
318
+ :return_type => return_type
319
+ )
320
+
321
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
194
322
  if @api_client.config.debugging
195
323
  @api_client.config.logger.debug "API called: ScoreApi#create_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
196
324
  end
@@ -199,24 +327,24 @@ module FlatApi
199
327
 
200
328
  # Create a new revision
201
329
  # Update a score by uploading a new revision for this one.
202
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
203
- # @param body
330
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
331
+ # @param body [ScoreRevisionCreation]
204
332
  # @param [Hash] opts the optional parameters
205
333
  # @return [ScoreRevision]
206
334
  def create_score_revision(score, body, opts = {})
207
335
  data, _status_code, _headers = create_score_revision_with_http_info(score, body, opts)
208
- return data
336
+ data
209
337
  end
210
338
 
211
339
  # Create a new revision
212
340
  # Update a score by uploading a new revision for this one.
213
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
214
- # @param body
341
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
342
+ # @param body [ScoreRevisionCreation]
215
343
  # @param [Hash] opts the optional parameters
216
- # @return [Array<(ScoreRevision, Fixnum, Hash)>] ScoreRevision data, response status code and response headers
344
+ # @return [Array<(ScoreRevision, Integer, Hash)>] ScoreRevision data, response status code and response headers
217
345
  def create_score_revision_with_http_info(score, body, opts = {})
218
346
  if @api_client.config.debugging
219
- @api_client.config.logger.debug "Calling API: ScoreApi.create_score_revision ..."
347
+ @api_client.config.logger.debug 'Calling API: ScoreApi.create_score_revision ...'
220
348
  end
221
349
  # verify the required parameter 'score' is set
222
350
  if @api_client.config.client_side_validation && score.nil?
@@ -227,31 +355,44 @@ module FlatApi
227
355
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.create_score_revision"
228
356
  end
229
357
  # resource path
230
- local_var_path = "/scores/{score}/revisions".sub('{' + 'score' + '}', score.to_s)
358
+ local_var_path = '/scores/{score}/revisions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
231
359
 
232
360
  # query parameters
233
- query_params = {}
361
+ query_params = opts[:query_params] || {}
234
362
 
235
363
  # header parameters
236
- header_params = {}
364
+ header_params = opts[:header_params] || {}
237
365
  # HTTP header 'Accept' (if needed)
238
366
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
239
367
  # HTTP header 'Content-Type'
240
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
368
+ content_type = @api_client.select_header_content_type(['application/json'])
369
+ if !content_type.nil?
370
+ header_params['Content-Type'] = content_type
371
+ end
241
372
 
242
373
  # form parameters
243
- form_params = {}
374
+ form_params = opts[:form_params] || {}
244
375
 
245
376
  # http body (model)
246
- post_body = @api_client.object_to_http_body(body)
247
- auth_names = ['OAuth2']
248
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
377
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
378
+
379
+ # return_type
380
+ return_type = opts[:debug_return_type] || 'ScoreRevision'
381
+
382
+ # auth_names
383
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
384
+
385
+ new_options = opts.merge(
386
+ :operation => :"ScoreApi.create_score_revision",
249
387
  :header_params => header_params,
250
388
  :query_params => query_params,
251
389
  :form_params => form_params,
252
390
  :body => post_body,
253
391
  :auth_names => auth_names,
254
- :return_type => 'ScoreRevision')
392
+ :return_type => return_type
393
+ )
394
+
395
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
255
396
  if @api_client.config.debugging
256
397
  @api_client.config.logger.debug "API called: ScoreApi#create_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
257
398
  end
@@ -259,53 +400,65 @@ module FlatApi
259
400
  end
260
401
 
261
402
  # Delete a score
262
- # This API call will schedule the deletion of the score, its revisions, and whole history. The user calling this API method must have the `aclAdmin` rights on this document to process this action. The score won't be accessible anymore after calling this method and the user's quota will directly be updated.
263
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
403
+ # This method can be used by the owner/admin (`aclAdmin` rights) of a score as well as regular collaborators. When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won't be accessible anymore after calling this method and the user's quota will directly be updated. When called by a regular collaborator (`aclRead` / `aclWrite`), the score will be unshared (i.e. removed from the account & own collections).
404
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
264
405
  # @param [Hash] opts the optional parameters
406
+ # @option opts [Boolean] :now If &#x60;true&#x60;, the score deletion will be scheduled to be done ASAP (default to false)
265
407
  # @return [nil]
266
408
  def delete_score(score, opts = {})
267
409
  delete_score_with_http_info(score, opts)
268
- return nil
410
+ nil
269
411
  end
270
412
 
271
413
  # Delete a score
272
- # This API call will schedule the deletion of the score, its revisions, and whole history. The user calling this API method must have the &#x60;aclAdmin&#x60; rights on this document to process this action. The score won&#39;t be accessible anymore after calling this method and the user&#39;s quota will directly be updated.
273
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
414
+ # This method can be used by the owner/admin (&#x60;aclAdmin&#x60; rights) of a score as well as regular collaborators. When called by an owner/admin, it will schedule the deletion of the score, its revisions, and complete history. The score won&#39;t be accessible anymore after calling this method and the user&#39;s quota will directly be updated. When called by a regular collaborator (&#x60;aclRead&#x60; / &#x60;aclWrite&#x60;), the score will be unshared (i.e. removed from the account &amp; own collections).
415
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
274
416
  # @param [Hash] opts the optional parameters
275
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
417
+ # @option opts [Boolean] :now If &#x60;true&#x60;, the score deletion will be scheduled to be done ASAP (default to false)
418
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
276
419
  def delete_score_with_http_info(score, opts = {})
277
420
  if @api_client.config.debugging
278
- @api_client.config.logger.debug "Calling API: ScoreApi.delete_score ..."
421
+ @api_client.config.logger.debug 'Calling API: ScoreApi.delete_score ...'
279
422
  end
280
423
  # verify the required parameter 'score' is set
281
424
  if @api_client.config.client_side_validation && score.nil?
282
425
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.delete_score"
283
426
  end
284
427
  # resource path
285
- local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)
428
+ local_var_path = '/scores/{score}'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
286
429
 
287
430
  # query parameters
288
- query_params = {}
431
+ query_params = opts[:query_params] || {}
432
+ query_params[:'now'] = opts[:'now'] if !opts[:'now'].nil?
289
433
 
290
434
  # header parameters
291
- header_params = {}
435
+ header_params = opts[:header_params] || {}
292
436
  # HTTP header 'Accept' (if needed)
293
437
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
294
- # HTTP header 'Content-Type'
295
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
296
438
 
297
439
  # form parameters
298
- form_params = {}
440
+ form_params = opts[:form_params] || {}
299
441
 
300
442
  # http body (model)
301
- post_body = nil
302
- auth_names = ['OAuth2']
303
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
443
+ post_body = opts[:debug_body]
444
+
445
+ # return_type
446
+ return_type = opts[:debug_return_type]
447
+
448
+ # auth_names
449
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
450
+
451
+ new_options = opts.merge(
452
+ :operation => :"ScoreApi.delete_score",
304
453
  :header_params => header_params,
305
454
  :query_params => query_params,
306
455
  :form_params => form_params,
307
456
  :body => post_body,
308
- :auth_names => auth_names)
457
+ :auth_names => auth_names,
458
+ :return_type => return_type
459
+ )
460
+
461
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
309
462
  if @api_client.config.debugging
310
463
  @api_client.config.logger.debug "API called: ScoreApi#delete_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
311
464
  end
@@ -313,27 +466,25 @@ module FlatApi
313
466
  end
314
467
 
315
468
  # Delete a comment
316
- #
317
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
318
- # @param comment Unique identifier of a sheet music comment
469
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
470
+ # @param comment [String] Unique identifier of a sheet music comment
319
471
  # @param [Hash] opts the optional parameters
320
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
472
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
321
473
  # @return [nil]
322
474
  def delete_score_comment(score, comment, opts = {})
323
475
  delete_score_comment_with_http_info(score, comment, opts)
324
- return nil
476
+ nil
325
477
  end
326
478
 
327
479
  # Delete a comment
328
- #
329
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
330
- # @param comment Unique identifier of a sheet music comment
480
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
481
+ # @param comment [String] Unique identifier of a sheet music comment
331
482
  # @param [Hash] opts the optional parameters
332
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
333
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
483
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
484
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
334
485
  def delete_score_comment_with_http_info(score, comment, opts = {})
335
486
  if @api_client.config.debugging
336
- @api_client.config.logger.debug "Calling API: ScoreApi.delete_score_comment ..."
487
+ @api_client.config.logger.debug 'Calling API: ScoreApi.delete_score_comment ...'
337
488
  end
338
489
  # verify the required parameter 'score' is set
339
490
  if @api_client.config.client_side_validation && score.nil?
@@ -344,31 +495,40 @@ module FlatApi
344
495
  fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.delete_score_comment"
345
496
  end
346
497
  # resource path
347
- local_var_path = "/scores/{score}/comments/{comment}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
498
+ local_var_path = '/scores/{score}/comments/{comment}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'comment' + '}', CGI.escape(comment.to_s))
348
499
 
349
500
  # query parameters
350
- query_params = {}
501
+ query_params = opts[:query_params] || {}
351
502
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
352
503
 
353
504
  # header parameters
354
- header_params = {}
505
+ header_params = opts[:header_params] || {}
355
506
  # HTTP header 'Accept' (if needed)
356
507
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
357
- # HTTP header 'Content-Type'
358
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
359
508
 
360
509
  # form parameters
361
- form_params = {}
510
+ form_params = opts[:form_params] || {}
362
511
 
363
512
  # http body (model)
364
- post_body = nil
365
- auth_names = ['OAuth2']
366
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
513
+ post_body = opts[:debug_body]
514
+
515
+ # return_type
516
+ return_type = opts[:debug_return_type]
517
+
518
+ # auth_names
519
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
520
+
521
+ new_options = opts.merge(
522
+ :operation => :"ScoreApi.delete_score_comment",
367
523
  :header_params => header_params,
368
524
  :query_params => query_params,
369
525
  :form_params => form_params,
370
526
  :body => post_body,
371
- :auth_names => auth_names)
527
+ :auth_names => auth_names,
528
+ :return_type => return_type
529
+ )
530
+
531
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
372
532
  if @api_client.config.debugging
373
533
  @api_client.config.logger.debug "API called: ScoreApi#delete_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
374
534
  end
@@ -376,25 +536,23 @@ module FlatApi
376
536
  end
377
537
 
378
538
  # Remove an audio or video track linked to the score
379
- #
380
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
381
- # @param track Unique identifier of a score audio track
539
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
540
+ # @param track [String] Unique identifier of a score audio track
382
541
  # @param [Hash] opts the optional parameters
383
542
  # @return [nil]
384
543
  def delete_score_track(score, track, opts = {})
385
544
  delete_score_track_with_http_info(score, track, opts)
386
- return nil
545
+ nil
387
546
  end
388
547
 
389
548
  # Remove an audio or video track linked to the score
390
- #
391
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
392
- # @param track Unique identifier of a score audio track
549
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
550
+ # @param track [String] Unique identifier of a score audio track
393
551
  # @param [Hash] opts the optional parameters
394
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
552
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
395
553
  def delete_score_track_with_http_info(score, track, opts = {})
396
554
  if @api_client.config.debugging
397
- @api_client.config.logger.debug "Calling API: ScoreApi.delete_score_track ..."
555
+ @api_client.config.logger.debug 'Calling API: ScoreApi.delete_score_track ...'
398
556
  end
399
557
  # verify the required parameter 'score' is set
400
558
  if @api_client.config.client_side_validation && score.nil?
@@ -405,30 +563,39 @@ module FlatApi
405
563
  fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.delete_score_track"
406
564
  end
407
565
  # resource path
408
- local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)
566
+ local_var_path = '/scores/{score}/tracks/{track}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'track' + '}', CGI.escape(track.to_s))
409
567
 
410
568
  # query parameters
411
- query_params = {}
569
+ query_params = opts[:query_params] || {}
412
570
 
413
571
  # header parameters
414
- header_params = {}
572
+ header_params = opts[:header_params] || {}
415
573
  # HTTP header 'Accept' (if needed)
416
574
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
417
- # HTTP header 'Content-Type'
418
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
419
575
 
420
576
  # form parameters
421
- form_params = {}
577
+ form_params = opts[:form_params] || {}
422
578
 
423
579
  # http body (model)
424
- post_body = nil
425
- auth_names = ['OAuth2']
426
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
580
+ post_body = opts[:debug_body]
581
+
582
+ # return_type
583
+ return_type = opts[:debug_return_type]
584
+
585
+ # auth_names
586
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
587
+
588
+ new_options = opts.merge(
589
+ :operation => :"ScoreApi.delete_score_track",
427
590
  :header_params => header_params,
428
591
  :query_params => query_params,
429
592
  :form_params => form_params,
430
593
  :body => post_body,
431
- :auth_names => auth_names)
594
+ :auth_names => auth_names,
595
+ :return_type => return_type
596
+ )
597
+
598
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
432
599
  if @api_client.config.debugging
433
600
  @api_client.config.logger.debug "API called: ScoreApi#delete_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
434
601
  end
@@ -436,56 +603,73 @@ module FlatApi
436
603
  end
437
604
 
438
605
  # Edit a score's metadata
439
- # This API method allows you to change the metadata of a score document (e.g. its `title` or `privacy`), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (`POST /v2/scores/{score}/revisions/{revision}`).
440
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
606
+ # This API method allows you to change the metadata of a score document (e.g. its `title` or `privacy`), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (`POST /v2/scores/{score}/revisions/{revision}`). When editing the `title`, `subtitle`, `composer`, `lyricist`, `arranger` or `licenseText`, the metadatas will be instantly be updated, and a real-time action will be pushed to update the document lazily. This pending document modification will be automatically be saved as a new version by either a connected client or our internal versioning service.
607
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
608
+ # @param body [ScoreModification]
441
609
  # @param [Hash] opts the optional parameters
442
- # @option opts [ScoreModification] :body
443
610
  # @return [ScoreDetails]
444
- def edit_score(score, opts = {})
445
- data, _status_code, _headers = edit_score_with_http_info(score, opts)
446
- return data
611
+ def edit_score(score, body, opts = {})
612
+ data, _status_code, _headers = edit_score_with_http_info(score, body, opts)
613
+ data
447
614
  end
448
615
 
449
616
  # Edit a score&#39;s metadata
450
- # This API method allows you to change the metadata of a score document (e.g. its &#x60;title&#x60; or &#x60;privacy&#x60;), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (&#x60;POST /v2/scores/{score}/revisions/{revision}&#x60;).
451
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
617
+ # This API method allows you to change the metadata of a score document (e.g. its &#x60;title&#x60; or &#x60;privacy&#x60;), all the properties are optional. To edit the file itself, create a new revision using the appropriate method (&#x60;POST /v2/scores/{score}/revisions/{revision}&#x60;). When editing the &#x60;title&#x60;, &#x60;subtitle&#x60;, &#x60;composer&#x60;, &#x60;lyricist&#x60;, &#x60;arranger&#x60; or &#x60;licenseText&#x60;, the metadatas will be instantly be updated, and a real-time action will be pushed to update the document lazily. This pending document modification will be automatically be saved as a new version by either a connected client or our internal versioning service.
618
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
619
+ # @param body [ScoreModification]
452
620
  # @param [Hash] opts the optional parameters
453
- # @option opts [ScoreModification] :body
454
- # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
455
- def edit_score_with_http_info(score, opts = {})
621
+ # @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
622
+ def edit_score_with_http_info(score, body, opts = {})
456
623
  if @api_client.config.debugging
457
- @api_client.config.logger.debug "Calling API: ScoreApi.edit_score ..."
624
+ @api_client.config.logger.debug 'Calling API: ScoreApi.edit_score ...'
458
625
  end
459
626
  # verify the required parameter 'score' is set
460
627
  if @api_client.config.client_side_validation && score.nil?
461
628
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.edit_score"
462
629
  end
630
+ # verify the required parameter 'body' is set
631
+ if @api_client.config.client_side_validation && body.nil?
632
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.edit_score"
633
+ end
463
634
  # resource path
464
- local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)
635
+ local_var_path = '/scores/{score}'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
465
636
 
466
637
  # query parameters
467
- query_params = {}
638
+ query_params = opts[:query_params] || {}
468
639
 
469
640
  # header parameters
470
- header_params = {}
641
+ header_params = opts[:header_params] || {}
471
642
  # HTTP header 'Accept' (if needed)
472
643
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
473
644
  # HTTP header 'Content-Type'
474
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
645
+ content_type = @api_client.select_header_content_type(['application/json'])
646
+ if !content_type.nil?
647
+ header_params['Content-Type'] = content_type
648
+ end
475
649
 
476
650
  # form parameters
477
- form_params = {}
651
+ form_params = opts[:form_params] || {}
478
652
 
479
653
  # http body (model)
480
- post_body = @api_client.object_to_http_body(opts[:'body'])
481
- auth_names = ['OAuth2']
482
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
654
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
655
+
656
+ # return_type
657
+ return_type = opts[:debug_return_type] || 'ScoreDetails'
658
+
659
+ # auth_names
660
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
661
+
662
+ new_options = opts.merge(
663
+ :operation => :"ScoreApi.edit_score",
483
664
  :header_params => header_params,
484
665
  :query_params => query_params,
485
666
  :form_params => form_params,
486
667
  :body => post_body,
487
668
  :auth_names => auth_names,
488
- :return_type => 'ScoreDetails')
669
+ :return_type => return_type
670
+ )
671
+
672
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
489
673
  if @api_client.config.debugging
490
674
  @api_client.config.logger.debug "API called: ScoreApi#edit_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
491
675
  end
@@ -494,26 +678,26 @@ module FlatApi
494
678
 
495
679
  # Fork a score
496
680
  # This API call will make a copy of the last revision of the specified score and create a new score. The copy of the score will have a privacy set to `private`. When using a [Flat for Education](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document.
497
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
498
- # @param body
681
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
682
+ # @param body [ScoreFork]
499
683
  # @param [Hash] opts the optional parameters
500
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
684
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
501
685
  # @return [ScoreDetails]
502
686
  def fork_score(score, body, opts = {})
503
687
  data, _status_code, _headers = fork_score_with_http_info(score, body, opts)
504
- return data
688
+ data
505
689
  end
506
690
 
507
691
  # Fork a score
508
692
  # This API call will make a copy of the last revision of the specified score and create a new score. The copy of the score will have a privacy set to &#x60;private&#x60;. When using a [Flat for Education](https://flat.io/edu) account, the inline and contextualized comments will be accessible in the child document.
509
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
510
- # @param body
693
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
694
+ # @param body [ScoreFork]
511
695
  # @param [Hash] opts the optional parameters
512
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
513
- # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
696
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
697
+ # @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
514
698
  def fork_score_with_http_info(score, body, opts = {})
515
699
  if @api_client.config.debugging
516
- @api_client.config.logger.debug "Calling API: ScoreApi.fork_score ..."
700
+ @api_client.config.logger.debug 'Calling API: ScoreApi.fork_score ...'
517
701
  end
518
702
  # verify the required parameter 'score' is set
519
703
  if @api_client.config.client_side_validation && score.nil?
@@ -524,148 +708,111 @@ module FlatApi
524
708
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.fork_score"
525
709
  end
526
710
  # resource path
527
- local_var_path = "/scores/{score}/fork".sub('{' + 'score' + '}', score.to_s)
711
+ local_var_path = '/scores/{score}/fork'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
528
712
 
529
713
  # query parameters
530
- query_params = {}
714
+ query_params = opts[:query_params] || {}
531
715
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
532
716
 
533
717
  # header parameters
534
- header_params = {}
718
+ header_params = opts[:header_params] || {}
535
719
  # HTTP header 'Accept' (if needed)
536
720
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
537
721
  # HTTP header 'Content-Type'
538
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
722
+ content_type = @api_client.select_header_content_type(['application/json'])
723
+ if !content_type.nil?
724
+ header_params['Content-Type'] = content_type
725
+ end
539
726
 
540
727
  # form parameters
541
- form_params = {}
728
+ form_params = opts[:form_params] || {}
542
729
 
543
730
  # http body (model)
544
- post_body = @api_client.object_to_http_body(body)
545
- auth_names = ['OAuth2']
546
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
547
- :header_params => header_params,
548
- :query_params => query_params,
549
- :form_params => form_params,
550
- :body => post_body,
551
- :auth_names => auth_names,
552
- :return_type => 'ScoreDetails')
553
- if @api_client.config.debugging
554
- @api_client.config.logger.debug "API called: ScoreApi#fork_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
555
- end
556
- return data, status_code, headers
557
- end
731
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
558
732
 
559
- # List liked scores
560
- #
561
- # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
562
- # @param [Hash] opts the optional parameters
563
- # @option opts [BOOLEAN] :ids Return only the identifiers of the scores
564
- # @return [Array<ScoreDetails>]
565
- def ger_user_likes(user, opts = {})
566
- data, _status_code, _headers = ger_user_likes_with_http_info(user, opts)
567
- return data
568
- end
733
+ # return_type
734
+ return_type = opts[:debug_return_type] || 'ScoreDetails'
569
735
 
570
- # List liked scores
571
- #
572
- # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
573
- # @param [Hash] opts the optional parameters
574
- # @option opts [BOOLEAN] :ids Return only the identifiers of the scores
575
- # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
576
- def ger_user_likes_with_http_info(user, opts = {})
577
- if @api_client.config.debugging
578
- @api_client.config.logger.debug "Calling API: ScoreApi.ger_user_likes ..."
579
- end
580
- # verify the required parameter 'user' is set
581
- if @api_client.config.client_side_validation && user.nil?
582
- fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.ger_user_likes"
583
- end
584
- # resource path
585
- local_var_path = "/users/{user}/likes".sub('{' + 'user' + '}', user.to_s)
586
-
587
- # query parameters
588
- query_params = {}
589
- query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
590
-
591
- # header parameters
592
- header_params = {}
593
- # HTTP header 'Accept' (if needed)
594
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
595
- # HTTP header 'Content-Type'
596
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
736
+ # auth_names
737
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
597
738
 
598
- # form parameters
599
- form_params = {}
600
-
601
- # http body (model)
602
- post_body = nil
603
- auth_names = ['OAuth2']
604
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
739
+ new_options = opts.merge(
740
+ :operation => :"ScoreApi.fork_score",
605
741
  :header_params => header_params,
606
742
  :query_params => query_params,
607
743
  :form_params => form_params,
608
744
  :body => post_body,
609
745
  :auth_names => auth_names,
610
- :return_type => 'Array<ScoreDetails>')
746
+ :return_type => return_type
747
+ )
748
+
749
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
611
750
  if @api_client.config.debugging
612
- @api_client.config.logger.debug "API called: ScoreApi#ger_user_likes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
751
+ @api_client.config.logger.debug "API called: ScoreApi#fork_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
613
752
  end
614
753
  return data, status_code, headers
615
754
  end
616
755
 
617
756
  # List group's scores
618
757
  # Get the list of scores shared with a group.
619
- # @param group Unique identifier of a Flat group
758
+ # @param group [String] Unique identifier of a Flat group
620
759
  # @param [Hash] opts the optional parameters
621
760
  # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
622
761
  # @return [Array<ScoreDetails>]
623
762
  def get_group_scores(group, opts = {})
624
763
  data, _status_code, _headers = get_group_scores_with_http_info(group, opts)
625
- return data
764
+ data
626
765
  end
627
766
 
628
767
  # List group&#39;s scores
629
768
  # Get the list of scores shared with a group.
630
- # @param group Unique identifier of a Flat group
769
+ # @param group [String] Unique identifier of a Flat group
631
770
  # @param [Hash] opts the optional parameters
632
771
  # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
633
- # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
772
+ # @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
634
773
  def get_group_scores_with_http_info(group, opts = {})
635
774
  if @api_client.config.debugging
636
- @api_client.config.logger.debug "Calling API: ScoreApi.get_group_scores ..."
775
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_group_scores ...'
637
776
  end
638
777
  # verify the required parameter 'group' is set
639
778
  if @api_client.config.client_side_validation && group.nil?
640
779
  fail ArgumentError, "Missing the required parameter 'group' when calling ScoreApi.get_group_scores"
641
780
  end
642
781
  # resource path
643
- local_var_path = "/groups/{group}/scores".sub('{' + 'group' + '}', group.to_s)
782
+ local_var_path = '/groups/{group}/scores'.sub('{' + 'group' + '}', CGI.escape(group.to_s))
644
783
 
645
784
  # query parameters
646
- query_params = {}
785
+ query_params = opts[:query_params] || {}
647
786
  query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
648
787
 
649
788
  # header parameters
650
- header_params = {}
789
+ header_params = opts[:header_params] || {}
651
790
  # HTTP header 'Accept' (if needed)
652
791
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
653
- # HTTP header 'Content-Type'
654
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
655
792
 
656
793
  # form parameters
657
- form_params = {}
794
+ form_params = opts[:form_params] || {}
658
795
 
659
796
  # http body (model)
660
- post_body = nil
661
- auth_names = ['OAuth2']
662
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
797
+ post_body = opts[:debug_body]
798
+
799
+ # return_type
800
+ return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
801
+
802
+ # auth_names
803
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
804
+
805
+ new_options = opts.merge(
806
+ :operation => :"ScoreApi.get_group_scores",
663
807
  :header_params => header_params,
664
808
  :query_params => query_params,
665
809
  :form_params => form_params,
666
810
  :body => post_body,
667
811
  :auth_names => auth_names,
668
- :return_type => 'Array<ScoreDetails>')
812
+ :return_type => return_type
813
+ )
814
+
815
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
669
816
  if @api_client.config.debugging
670
817
  @api_client.config.logger.debug "API called: ScoreApi#get_group_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
671
818
  end
@@ -674,56 +821,64 @@ module FlatApi
674
821
 
675
822
  # Get a score's metadata
676
823
  # Get the details of a score identified by the `score` parameter in the URL. The currently authenticated user must have at least a read access to the document to use this API call.
677
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
824
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
678
825
  # @param [Hash] opts the optional parameters
679
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
826
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
680
827
  # @return [ScoreDetails]
681
828
  def get_score(score, opts = {})
682
829
  data, _status_code, _headers = get_score_with_http_info(score, opts)
683
- return data
830
+ data
684
831
  end
685
832
 
686
833
  # Get a score&#39;s metadata
687
834
  # Get the details of a score identified by the &#x60;score&#x60; parameter in the URL. The currently authenticated user must have at least a read access to the document to use this API call.
688
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
835
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
689
836
  # @param [Hash] opts the optional parameters
690
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
691
- # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
837
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
838
+ # @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
692
839
  def get_score_with_http_info(score, opts = {})
693
840
  if @api_client.config.debugging
694
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score ..."
841
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score ...'
695
842
  end
696
843
  # verify the required parameter 'score' is set
697
844
  if @api_client.config.client_side_validation && score.nil?
698
845
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score"
699
846
  end
700
847
  # resource path
701
- local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)
848
+ local_var_path = '/scores/{score}'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
702
849
 
703
850
  # query parameters
704
- query_params = {}
851
+ query_params = opts[:query_params] || {}
705
852
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
706
853
 
707
854
  # header parameters
708
- header_params = {}
855
+ header_params = opts[:header_params] || {}
709
856
  # HTTP header 'Accept' (if needed)
710
857
  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/json'])
713
858
 
714
859
  # form parameters
715
- form_params = {}
860
+ form_params = opts[:form_params] || {}
716
861
 
717
862
  # http body (model)
718
- post_body = nil
719
- auth_names = ['OAuth2']
720
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
863
+ post_body = opts[:debug_body]
864
+
865
+ # return_type
866
+ return_type = opts[:debug_return_type] || 'ScoreDetails'
867
+
868
+ # auth_names
869
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
870
+
871
+ new_options = opts.merge(
872
+ :operation => :"ScoreApi.get_score",
721
873
  :header_params => header_params,
722
874
  :query_params => query_params,
723
875
  :form_params => form_params,
724
876
  :body => post_body,
725
877
  :auth_names => auth_names,
726
- :return_type => 'ScoreDetails')
878
+ :return_type => return_type
879
+ )
880
+
881
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
727
882
  if @api_client.config.debugging
728
883
  @api_client.config.logger.debug "API called: ScoreApi#get_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
729
884
  end
@@ -732,26 +887,26 @@ module FlatApi
732
887
 
733
888
  # Get a collaborator
734
889
  # Get the information about a collaborator (User or Group).
735
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
736
- # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
890
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
891
+ # @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
737
892
  # @param [Hash] opts the optional parameters
738
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
739
- # @return [ScoreCollaborator]
893
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
894
+ # @return [ResourceCollaborator]
740
895
  def get_score_collaborator(score, collaborator, opts = {})
741
896
  data, _status_code, _headers = get_score_collaborator_with_http_info(score, collaborator, opts)
742
- return data
897
+ data
743
898
  end
744
899
 
745
900
  # Get a collaborator
746
901
  # Get the information about a collaborator (User or Group).
747
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
748
- # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
902
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
903
+ # @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
749
904
  # @param [Hash] opts the optional parameters
750
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
751
- # @return [Array<(ScoreCollaborator, Fixnum, Hash)>] ScoreCollaborator data, response status code and response headers
905
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
906
+ # @return [Array<(ResourceCollaborator, Integer, Hash)>] ResourceCollaborator data, response status code and response headers
752
907
  def get_score_collaborator_with_http_info(score, collaborator, opts = {})
753
908
  if @api_client.config.debugging
754
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborator ..."
909
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_collaborator ...'
755
910
  end
756
911
  # verify the required parameter 'score' is set
757
912
  if @api_client.config.client_side_validation && score.nil?
@@ -762,32 +917,40 @@ module FlatApi
762
917
  fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.get_score_collaborator"
763
918
  end
764
919
  # resource path
765
- local_var_path = "/scores/{score}/collaborators/{collaborator}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'collaborator' + '}', collaborator.to_s)
920
+ local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'collaborator' + '}', CGI.escape(collaborator.to_s))
766
921
 
767
922
  # query parameters
768
- query_params = {}
923
+ query_params = opts[:query_params] || {}
769
924
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
770
925
 
771
926
  # header parameters
772
- header_params = {}
927
+ header_params = opts[:header_params] || {}
773
928
  # HTTP header 'Accept' (if needed)
774
929
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
775
- # HTTP header 'Content-Type'
776
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
777
930
 
778
931
  # form parameters
779
- form_params = {}
932
+ form_params = opts[:form_params] || {}
780
933
 
781
934
  # http body (model)
782
- post_body = nil
783
- auth_names = ['OAuth2']
784
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
935
+ post_body = opts[:debug_body]
936
+
937
+ # return_type
938
+ return_type = opts[:debug_return_type] || 'ResourceCollaborator'
939
+
940
+ # auth_names
941
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
942
+
943
+ new_options = opts.merge(
944
+ :operation => :"ScoreApi.get_score_collaborator",
785
945
  :header_params => header_params,
786
946
  :query_params => query_params,
787
947
  :form_params => form_params,
788
948
  :body => post_body,
789
949
  :auth_names => auth_names,
790
- :return_type => 'ScoreCollaborator')
950
+ :return_type => return_type
951
+ )
952
+
953
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
791
954
  if @api_client.config.debugging
792
955
  @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
793
956
  end
@@ -796,56 +959,64 @@ module FlatApi
796
959
 
797
960
  # List the collaborators
798
961
  # This API call will list the different collaborators of a score and their rights on the document. The returned list will at least contain the owner of the document. Collaborators can be a single user (the object `user` will be populated) or a group (the object `group` will be populated).
799
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
962
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
800
963
  # @param [Hash] opts the optional parameters
801
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
802
- # @return [Array<ScoreCollaborator>]
964
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
965
+ # @return [Array<ResourceCollaborator>]
803
966
  def get_score_collaborators(score, opts = {})
804
967
  data, _status_code, _headers = get_score_collaborators_with_http_info(score, opts)
805
- return data
968
+ data
806
969
  end
807
970
 
808
971
  # List the collaborators
809
972
  # This API call will list the different collaborators of a score and their rights on the document. The returned list will at least contain the owner of the document. Collaborators can be a single user (the object &#x60;user&#x60; will be populated) or a group (the object &#x60;group&#x60; will be populated).
810
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
973
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
811
974
  # @param [Hash] opts the optional parameters
812
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
813
- # @return [Array<(Array<ScoreCollaborator>, Fixnum, Hash)>] Array<ScoreCollaborator> data, response status code and response headers
975
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
976
+ # @return [Array<(Array<ResourceCollaborator>, Integer, Hash)>] Array<ResourceCollaborator> data, response status code and response headers
814
977
  def get_score_collaborators_with_http_info(score, opts = {})
815
978
  if @api_client.config.debugging
816
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborators ..."
979
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_collaborators ...'
817
980
  end
818
981
  # verify the required parameter 'score' is set
819
982
  if @api_client.config.client_side_validation && score.nil?
820
983
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_collaborators"
821
984
  end
822
985
  # resource path
823
- local_var_path = "/scores/{score}/collaborators".sub('{' + 'score' + '}', score.to_s)
986
+ local_var_path = '/scores/{score}/collaborators'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
824
987
 
825
988
  # query parameters
826
- query_params = {}
989
+ query_params = opts[:query_params] || {}
827
990
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
828
991
 
829
992
  # header parameters
830
- header_params = {}
993
+ header_params = opts[:header_params] || {}
831
994
  # HTTP header 'Accept' (if needed)
832
995
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
833
- # HTTP header 'Content-Type'
834
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
835
996
 
836
997
  # form parameters
837
- form_params = {}
998
+ form_params = opts[:form_params] || {}
838
999
 
839
1000
  # http body (model)
840
- post_body = nil
841
- auth_names = ['OAuth2']
842
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1001
+ post_body = opts[:debug_body]
1002
+
1003
+ # return_type
1004
+ return_type = opts[:debug_return_type] || 'Array<ResourceCollaborator>'
1005
+
1006
+ # auth_names
1007
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1008
+
1009
+ new_options = opts.merge(
1010
+ :operation => :"ScoreApi.get_score_collaborators",
843
1011
  :header_params => header_params,
844
1012
  :query_params => query_params,
845
1013
  :form_params => form_params,
846
1014
  :body => post_body,
847
1015
  :auth_names => auth_names,
848
- :return_type => 'Array<ScoreCollaborator>')
1016
+ :return_type => return_type
1017
+ )
1018
+
1019
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
849
1020
  if @api_client.config.debugging
850
1021
  @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
851
1022
  end
@@ -854,56 +1025,85 @@ module FlatApi
854
1025
 
855
1026
  # List comments
856
1027
  # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
857
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1028
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
858
1029
  # @param [Hash] opts the optional parameters
859
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1030
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1031
+ # @option opts [String] :type Filter the comments by type
1032
+ # @option opts [String] :sort Sort
1033
+ # @option opts [String] :direction Sort direction
860
1034
  # @return [Array<ScoreComment>]
861
1035
  def get_score_comments(score, opts = {})
862
1036
  data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
863
- return data
1037
+ data
864
1038
  end
865
1039
 
866
1040
  # List comments
867
1041
  # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
868
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1042
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
869
1043
  # @param [Hash] opts the optional parameters
870
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
871
- # @return [Array<(Array<ScoreComment>, Fixnum, Hash)>] Array<ScoreComment> data, response status code and response headers
1044
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1045
+ # @option opts [String] :type Filter the comments by type
1046
+ # @option opts [String] :sort Sort
1047
+ # @option opts [String] :direction Sort direction
1048
+ # @return [Array<(Array<ScoreComment>, Integer, Hash)>] Array<ScoreComment> data, response status code and response headers
872
1049
  def get_score_comments_with_http_info(score, opts = {})
873
1050
  if @api_client.config.debugging
874
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_comments ..."
1051
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_comments ...'
875
1052
  end
876
1053
  # verify the required parameter 'score' is set
877
1054
  if @api_client.config.client_side_validation && score.nil?
878
1055
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_comments"
879
1056
  end
1057
+ allowable_values = ["document", "inline"]
1058
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1059
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
1060
+ end
1061
+ allowable_values = ["date"]
1062
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1063
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1064
+ end
1065
+ allowable_values = ["asc", "desc"]
1066
+ if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
1067
+ fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
1068
+ end
880
1069
  # resource path
881
- local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)
1070
+ local_var_path = '/scores/{score}/comments'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
882
1071
 
883
1072
  # query parameters
884
- query_params = {}
1073
+ query_params = opts[:query_params] || {}
885
1074
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1075
+ query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
1076
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1077
+ query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
886
1078
 
887
1079
  # header parameters
888
- header_params = {}
1080
+ header_params = opts[:header_params] || {}
889
1081
  # HTTP header 'Accept' (if needed)
890
1082
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
891
- # HTTP header 'Content-Type'
892
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
893
1083
 
894
1084
  # form parameters
895
- form_params = {}
1085
+ form_params = opts[:form_params] || {}
896
1086
 
897
1087
  # http body (model)
898
- post_body = nil
899
- auth_names = ['OAuth2']
900
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1088
+ post_body = opts[:debug_body]
1089
+
1090
+ # return_type
1091
+ return_type = opts[:debug_return_type] || 'Array<ScoreComment>'
1092
+
1093
+ # auth_names
1094
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1095
+
1096
+ new_options = opts.merge(
1097
+ :operation => :"ScoreApi.get_score_comments",
901
1098
  :header_params => header_params,
902
1099
  :query_params => query_params,
903
1100
  :form_params => form_params,
904
1101
  :body => post_body,
905
1102
  :auth_names => auth_names,
906
- :return_type => 'Array<ScoreComment>')
1103
+ :return_type => return_type
1104
+ )
1105
+
1106
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
907
1107
  if @api_client.config.debugging
908
1108
  @api_client.config.logger.debug "API called: ScoreApi#get_score_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
909
1109
  end
@@ -912,26 +1112,26 @@ module FlatApi
912
1112
 
913
1113
  # Get a score revision
914
1114
  # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata.
915
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
916
- # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
1115
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1116
+ # @param revision [String] Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
917
1117
  # @param [Hash] opts the optional parameters
918
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1118
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
919
1119
  # @return [ScoreRevision]
920
1120
  def get_score_revision(score, revision, opts = {})
921
1121
  data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts)
922
- return data
1122
+ data
923
1123
  end
924
1124
 
925
1125
  # Get a score revision
926
1126
  # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to get a specific revision metadata.
927
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
928
- # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
1127
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1128
+ # @param revision [String] Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
929
1129
  # @param [Hash] opts the optional parameters
930
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
931
- # @return [Array<(ScoreRevision, Fixnum, Hash)>] ScoreRevision data, response status code and response headers
1130
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1131
+ # @return [Array<(ScoreRevision, Integer, Hash)>] ScoreRevision data, response status code and response headers
932
1132
  def get_score_revision_with_http_info(score, revision, opts = {})
933
1133
  if @api_client.config.debugging
934
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revision ..."
1134
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revision ...'
935
1135
  end
936
1136
  # verify the required parameter 'score' is set
937
1137
  if @api_client.config.client_side_validation && score.nil?
@@ -942,32 +1142,40 @@ module FlatApi
942
1142
  fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision"
943
1143
  end
944
1144
  # resource path
945
- local_var_path = "/scores/{score}/revisions/{revision}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'revision' + '}', revision.to_s)
1145
+ local_var_path = '/scores/{score}/revisions/{revision}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'revision' + '}', CGI.escape(revision.to_s))
946
1146
 
947
1147
  # query parameters
948
- query_params = {}
1148
+ query_params = opts[:query_params] || {}
949
1149
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
950
1150
 
951
1151
  # header parameters
952
- header_params = {}
1152
+ header_params = opts[:header_params] || {}
953
1153
  # HTTP header 'Accept' (if needed)
954
1154
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
955
- # HTTP header 'Content-Type'
956
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
957
1155
 
958
1156
  # form parameters
959
- form_params = {}
1157
+ form_params = opts[:form_params] || {}
960
1158
 
961
1159
  # http body (model)
962
- post_body = nil
963
- auth_names = ['OAuth2']
964
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1160
+ post_body = opts[:debug_body]
1161
+
1162
+ # return_type
1163
+ return_type = opts[:debug_return_type] || 'ScoreRevision'
1164
+
1165
+ # auth_names
1166
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1167
+
1168
+ new_options = opts.merge(
1169
+ :operation => :"ScoreApi.get_score_revision",
965
1170
  :header_params => header_params,
966
1171
  :query_params => query_params,
967
1172
  :form_params => form_params,
968
1173
  :body => post_body,
969
1174
  :auth_names => auth_names,
970
- :return_type => 'ScoreRevision')
1175
+ :return_type => return_type
1176
+ )
1177
+
1178
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
971
1179
  if @api_client.config.debugging
972
1180
  @api_client.config.logger.debug "API called: ScoreApi#get_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
973
1181
  end
@@ -975,33 +1183,35 @@ module FlatApi
975
1183
  end
976
1184
 
977
1185
  # Get a score revision data
978
- # Retrieve the file corresponding to a score revision (the following formats are available: Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, MP3 `mp3`, WAV `wav`, MIDI `midi`, or a tumbnail of the first page `thumbnail.png`).
979
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
980
- # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
981
- # @param format The format of the file you will retrieve
1186
+ # Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, MP3 `mp3`, WAV `wav`, MIDI `midi`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`.
1187
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1188
+ # @param revision [String] Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
1189
+ # @param format [String] The format of the file you will retrieve
982
1190
  # @param [Hash] opts the optional parameters
983
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
984
- # @option opts [BOOLEAN] :only_cached Only return files already generated and cached in Flat&#39;s production cache. If the file is not availabe, a 404 will be returned
985
- # @option opts [String] :parts An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \&quot;1,2,5\&quot;.
986
- # @return [String]
1191
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1192
+ # @option opts [String] :parts An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \&quot;59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\&quot;.
1193
+ # @option opts [Boolean] :default_track When &#x60;format&#x60; is &#x60;mp3&#x60;, this property is set to true and the score has a default &#x60;ScoreTrack&#x60; (mp3), this one will be returned instead of the playback file.
1194
+ # @option opts [Boolean] :url Returns a json with the &#x60;url&#x60; in it instead of redirecting
1195
+ # @return [File]
987
1196
  def get_score_revision_data(score, revision, format, opts = {})
988
1197
  data, _status_code, _headers = get_score_revision_data_with_http_info(score, revision, format, opts)
989
- return data
1198
+ data
990
1199
  end
991
1200
 
992
1201
  # Get a score revision data
993
- # Retrieve the file corresponding to a score revision (the following formats are available: Flat JSON/Adagio JSON &#x60;json&#x60;, MusicXML &#x60;mxl&#x60;/&#x60;xml&#x60;, MP3 &#x60;mp3&#x60;, WAV &#x60;wav&#x60;, MIDI &#x60;midi&#x60;, or a tumbnail of the first page &#x60;thumbnail.png&#x60;).
994
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
995
- # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
996
- # @param format The format of the file you will retrieve
1202
+ # Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON &#x60;json&#x60;, MusicXML &#x60;mxl&#x60;/&#x60;xml&#x60;, MP3 &#x60;mp3&#x60;, WAV &#x60;wav&#x60;, MIDI &#x60;midi&#x60;, a tumbnail of the first page &#x60;thumbnail.png&#x60; or auto sync points &#x60;synchronizationPoints&#x60;.
1203
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1204
+ # @param revision [String] Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
1205
+ # @param format [String] The format of the file you will retrieve
997
1206
  # @param [Hash] opts the optional parameters
998
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
999
- # @option opts [BOOLEAN] :only_cached Only return files already generated and cached in Flat&#39;s production cache. If the file is not availabe, a 404 will be returned
1000
- # @option opts [String] :parts An optional a set of parts to be exported. This parameter must be specified with a list of integers. For example \&quot;1,2,5\&quot;.
1001
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
1207
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1208
+ # @option opts [String] :parts An optional a set of parts uuid to be exported. This parameter must be composed of parts uuids separated by commas. For example \&quot;59df645f-bb1c-f1b4-b573-d2afc4491f94,34ef645f-1aef-f3bc-1564-34cca4492b87\&quot;.
1209
+ # @option opts [Boolean] :default_track When &#x60;format&#x60; is &#x60;mp3&#x60;, this property is set to true and the score has a default &#x60;ScoreTrack&#x60; (mp3), this one will be returned instead of the playback file.
1210
+ # @option opts [Boolean] :url Returns a json with the &#x60;url&#x60; in it instead of redirecting
1211
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
1002
1212
  def get_score_revision_data_with_http_info(score, revision, format, opts = {})
1003
1213
  if @api_client.config.debugging
1004
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revision_data ..."
1214
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revision_data ...'
1005
1215
  end
1006
1216
  # verify the required parameter 'score' is set
1007
1217
  if @api_client.config.client_side_validation && score.nil?
@@ -1016,38 +1226,48 @@ module FlatApi
1016
1226
  fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.get_score_revision_data"
1017
1227
  end
1018
1228
  # verify enum value
1019
- if @api_client.config.client_side_validation && !['json', 'mxl', 'xml', 'mp3', 'wav', 'midi', 'thumbnail.png'].include?(format)
1020
- fail ArgumentError, "invalid value for 'format', must be one of json, mxl, xml, mp3, wav, midi, thumbnail.png"
1229
+ allowable_values = ["json", "mxl", "xml", "mp3", "wav", "midi", "thumbnail.png", "synchronizationPoints"]
1230
+ if @api_client.config.client_side_validation && !allowable_values.include?(format)
1231
+ fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
1021
1232
  end
1022
1233
  # resource path
1023
- local_var_path = "/scores/{score}/revisions/{revision}/{format}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'revision' + '}', revision.to_s).sub('{' + 'format' + '}', format.to_s)
1234
+ local_var_path = '/scores/{score}/revisions/{revision}/{format}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'revision' + '}', CGI.escape(revision.to_s)).sub('{' + 'format' + '}', CGI.escape(format.to_s))
1024
1235
 
1025
1236
  # query parameters
1026
- query_params = {}
1237
+ query_params = opts[:query_params] || {}
1027
1238
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1028
- query_params[:'onlyCached'] = opts[:'only_cached'] if !opts[:'only_cached'].nil?
1029
1239
  query_params[:'parts'] = opts[:'parts'] if !opts[:'parts'].nil?
1240
+ query_params[:'defaultTrack'] = opts[:'default_track'] if !opts[:'default_track'].nil?
1241
+ query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
1030
1242
 
1031
1243
  # header parameters
1032
- header_params = {}
1244
+ header_params = opts[:header_params] || {}
1033
1245
  # HTTP header 'Accept' (if needed)
1034
1246
  header_params['Accept'] = @api_client.select_header_accept(['application/json', 'application/vnd.recordare.musicxml+xml', 'application/vnd.recordare.musicxml', 'audio/mp3', 'audio/wav', 'audio/midi', 'image/png'])
1035
- # HTTP header 'Content-Type'
1036
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1037
1247
 
1038
1248
  # form parameters
1039
- form_params = {}
1249
+ form_params = opts[:form_params] || {}
1040
1250
 
1041
1251
  # http body (model)
1042
- post_body = nil
1043
- auth_names = ['OAuth2']
1044
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1252
+ post_body = opts[:debug_body]
1253
+
1254
+ # return_type
1255
+ return_type = opts[:debug_return_type] || 'File'
1256
+
1257
+ # auth_names
1258
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1259
+
1260
+ new_options = opts.merge(
1261
+ :operation => :"ScoreApi.get_score_revision_data",
1045
1262
  :header_params => header_params,
1046
1263
  :query_params => query_params,
1047
1264
  :form_params => form_params,
1048
1265
  :body => post_body,
1049
1266
  :auth_names => auth_names,
1050
- :return_type => 'String')
1267
+ :return_type => return_type
1268
+ )
1269
+
1270
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1051
1271
  if @api_client.config.debugging
1052
1272
  @api_client.config.logger.debug "API called: ScoreApi#get_score_revision_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1053
1273
  end
@@ -1056,56 +1276,64 @@ module FlatApi
1056
1276
 
1057
1277
  # List the revisions
1058
1278
  # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to list all of them, sorted by last modification. Depending the plan of the account, this list can be trunked to the few last revisions.
1059
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1279
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1060
1280
  # @param [Hash] opts the optional parameters
1061
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1281
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1062
1282
  # @return [Array<ScoreRevision>]
1063
1283
  def get_score_revisions(score, opts = {})
1064
1284
  data, _status_code, _headers = get_score_revisions_with_http_info(score, opts)
1065
- return data
1285
+ data
1066
1286
  end
1067
1287
 
1068
1288
  # List the revisions
1069
1289
  # When creating a score or saving a new version of a score, a revision is created in our storage. This method allows you to list all of them, sorted by last modification. Depending the plan of the account, this list can be trunked to the few last revisions.
1070
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1290
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1071
1291
  # @param [Hash] opts the optional parameters
1072
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1073
- # @return [Array<(Array<ScoreRevision>, Fixnum, Hash)>] Array<ScoreRevision> data, response status code and response headers
1292
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1293
+ # @return [Array<(Array<ScoreRevision>, Integer, Hash)>] Array<ScoreRevision> data, response status code and response headers
1074
1294
  def get_score_revisions_with_http_info(score, opts = {})
1075
1295
  if @api_client.config.debugging
1076
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revisions ..."
1296
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revisions ...'
1077
1297
  end
1078
1298
  # verify the required parameter 'score' is set
1079
1299
  if @api_client.config.client_side_validation && score.nil?
1080
1300
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revisions"
1081
1301
  end
1082
1302
  # resource path
1083
- local_var_path = "/scores/{score}/revisions".sub('{' + 'score' + '}', score.to_s)
1303
+ local_var_path = '/scores/{score}/revisions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
1084
1304
 
1085
1305
  # query parameters
1086
- query_params = {}
1306
+ query_params = opts[:query_params] || {}
1087
1307
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1088
1308
 
1089
1309
  # header parameters
1090
- header_params = {}
1310
+ header_params = opts[:header_params] || {}
1091
1311
  # HTTP header 'Accept' (if needed)
1092
1312
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1093
- # HTTP header 'Content-Type'
1094
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1095
1313
 
1096
1314
  # form parameters
1097
- form_params = {}
1315
+ form_params = opts[:form_params] || {}
1098
1316
 
1099
1317
  # http body (model)
1100
- post_body = nil
1101
- auth_names = ['OAuth2']
1102
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1318
+ post_body = opts[:debug_body]
1319
+
1320
+ # return_type
1321
+ return_type = opts[:debug_return_type] || 'Array<ScoreRevision>'
1322
+
1323
+ # auth_names
1324
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1325
+
1326
+ new_options = opts.merge(
1327
+ :operation => :"ScoreApi.get_score_revisions",
1103
1328
  :header_params => header_params,
1104
1329
  :query_params => query_params,
1105
1330
  :form_params => form_params,
1106
1331
  :body => post_body,
1107
1332
  :auth_names => auth_names,
1108
- :return_type => 'Array<ScoreRevision>')
1333
+ :return_type => return_type
1334
+ )
1335
+
1336
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1109
1337
  if @api_client.config.debugging
1110
1338
  @api_client.config.logger.debug "API called: ScoreApi#get_score_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1111
1339
  end
@@ -1114,53 +1342,61 @@ module FlatApi
1114
1342
 
1115
1343
  # List submissions related to the score
1116
1344
  # This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
1117
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1345
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1118
1346
  # @param [Hash] opts the optional parameters
1119
1347
  # @return [Array<AssignmentSubmission>]
1120
1348
  def get_score_submissions(score, opts = {})
1121
1349
  data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
1122
- return data
1350
+ data
1123
1351
  end
1124
1352
 
1125
1353
  # List submissions related to the score
1126
1354
  # This API call will list the different assignments submissions where the score is attached. This method can be used by anyone that are part of the organization and have at least read access to the document.
1127
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1355
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1128
1356
  # @param [Hash] opts the optional parameters
1129
- # @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
1357
+ # @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
1130
1358
  def get_score_submissions_with_http_info(score, opts = {})
1131
1359
  if @api_client.config.debugging
1132
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_submissions ..."
1360
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_submissions ...'
1133
1361
  end
1134
1362
  # verify the required parameter 'score' is set
1135
1363
  if @api_client.config.client_side_validation && score.nil?
1136
1364
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_submissions"
1137
1365
  end
1138
1366
  # resource path
1139
- local_var_path = "/scores/{score}/submissions".sub('{' + 'score' + '}', score.to_s)
1367
+ local_var_path = '/scores/{score}/submissions'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
1140
1368
 
1141
1369
  # query parameters
1142
- query_params = {}
1370
+ query_params = opts[:query_params] || {}
1143
1371
 
1144
1372
  # header parameters
1145
- header_params = {}
1373
+ header_params = opts[:header_params] || {}
1146
1374
  # HTTP header 'Accept' (if needed)
1147
1375
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1148
- # HTTP header 'Content-Type'
1149
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1150
1376
 
1151
1377
  # form parameters
1152
- form_params = {}
1378
+ form_params = opts[:form_params] || {}
1153
1379
 
1154
1380
  # http body (model)
1155
- post_body = nil
1156
- auth_names = ['OAuth2']
1157
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1381
+ post_body = opts[:debug_body]
1382
+
1383
+ # return_type
1384
+ return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
1385
+
1386
+ # auth_names
1387
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1388
+
1389
+ new_options = opts.merge(
1390
+ :operation => :"ScoreApi.get_score_submissions",
1158
1391
  :header_params => header_params,
1159
1392
  :query_params => query_params,
1160
1393
  :form_params => form_params,
1161
1394
  :body => post_body,
1162
1395
  :auth_names => auth_names,
1163
- :return_type => 'Array<AssignmentSubmission>')
1396
+ :return_type => return_type
1397
+ )
1398
+
1399
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1164
1400
  if @api_client.config.debugging
1165
1401
  @api_client.config.logger.debug "API called: ScoreApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1166
1402
  end
@@ -1168,27 +1404,25 @@ module FlatApi
1168
1404
  end
1169
1405
 
1170
1406
  # Retrieve the details of an audio or video track linked to a score
1171
- #
1172
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1173
- # @param track Unique identifier of a score audio track
1407
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1408
+ # @param track [String] Unique identifier of a score audio track
1174
1409
  # @param [Hash] opts the optional parameters
1175
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1410
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1176
1411
  # @return [ScoreTrack]
1177
1412
  def get_score_track(score, track, opts = {})
1178
1413
  data, _status_code, _headers = get_score_track_with_http_info(score, track, opts)
1179
- return data
1414
+ data
1180
1415
  end
1181
1416
 
1182
1417
  # Retrieve the details of an audio or video track linked to a score
1183
- #
1184
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1185
- # @param track Unique identifier of a score audio track
1418
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1419
+ # @param track [String] Unique identifier of a score audio track
1186
1420
  # @param [Hash] opts the optional parameters
1187
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1188
- # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
1421
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1422
+ # @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
1189
1423
  def get_score_track_with_http_info(score, track, opts = {})
1190
1424
  if @api_client.config.debugging
1191
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_track ..."
1425
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_track ...'
1192
1426
  end
1193
1427
  # verify the required parameter 'score' is set
1194
1428
  if @api_client.config.client_side_validation && score.nil?
@@ -1199,90 +1433,187 @@ module FlatApi
1199
1433
  fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.get_score_track"
1200
1434
  end
1201
1435
  # resource path
1202
- local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)
1436
+ local_var_path = '/scores/{score}/tracks/{track}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'track' + '}', CGI.escape(track.to_s))
1203
1437
 
1204
1438
  # query parameters
1205
- query_params = {}
1439
+ query_params = opts[:query_params] || {}
1206
1440
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1207
1441
 
1208
1442
  # header parameters
1209
- header_params = {}
1443
+ header_params = opts[:header_params] || {}
1210
1444
  # HTTP header 'Accept' (if needed)
1211
1445
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1212
- # HTTP header 'Content-Type'
1213
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1214
1446
 
1215
1447
  # form parameters
1216
- form_params = {}
1448
+ form_params = opts[:form_params] || {}
1217
1449
 
1218
1450
  # http body (model)
1219
- post_body = nil
1220
- auth_names = ['OAuth2']
1221
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1451
+ post_body = opts[:debug_body]
1452
+
1453
+ # return_type
1454
+ return_type = opts[:debug_return_type] || 'ScoreTrack'
1455
+
1456
+ # auth_names
1457
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1458
+
1459
+ new_options = opts.merge(
1460
+ :operation => :"ScoreApi.get_score_track",
1222
1461
  :header_params => header_params,
1223
1462
  :query_params => query_params,
1224
1463
  :form_params => form_params,
1225
1464
  :body => post_body,
1226
1465
  :auth_names => auth_names,
1227
- :return_type => 'ScoreTrack')
1466
+ :return_type => return_type
1467
+ )
1468
+
1469
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1228
1470
  if @api_client.config.debugging
1229
1471
  @api_client.config.logger.debug "API called: ScoreApi#get_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1230
1472
  end
1231
1473
  return data, status_code, headers
1232
1474
  end
1233
1475
 
1476
+ # List liked scores
1477
+ # @param user [String] Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1478
+ # @param [Hash] opts the optional parameters
1479
+ # @option opts [String] :_next An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
1480
+ # @option opts [String] :previous An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
1481
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
1482
+ # @option opts [Boolean] :ids Return only the identifiers of the scores
1483
+ # @return [Array<ScoreDetails>]
1484
+ def get_user_likes(user, opts = {})
1485
+ data, _status_code, _headers = get_user_likes_with_http_info(user, opts)
1486
+ data
1487
+ end
1488
+
1489
+ # List liked scores
1490
+ # @param user [String] Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1491
+ # @param [Hash] opts the optional parameters
1492
+ # @option opts [String] :_next An opaque string cursor to fetch the next page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
1493
+ # @option opts [String] :previous An opaque string cursor to fetch the previous page of data. The paginated API URLs are returned in the &#x60;Link&#x60; header when requesting the API. These URLs will contain a &#x60;next&#x60; and &#x60;previous&#x60; cursor based on the available data.
1494
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
1495
+ # @option opts [Boolean] :ids Return only the identifiers of the scores
1496
+ # @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
1497
+ def get_user_likes_with_http_info(user, opts = {})
1498
+ if @api_client.config.debugging
1499
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_user_likes ...'
1500
+ end
1501
+ # verify the required parameter 'user' is set
1502
+ if @api_client.config.client_side_validation && user.nil?
1503
+ fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_likes"
1504
+ end
1505
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1506
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_likes, must be smaller than or equal to 100.'
1507
+ end
1508
+
1509
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1510
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_likes, must be greater than or equal to 1.'
1511
+ end
1512
+
1513
+ # resource path
1514
+ local_var_path = '/users/{user}/likes'.sub('{' + 'user' + '}', CGI.escape(user.to_s))
1515
+
1516
+ # query parameters
1517
+ query_params = opts[:query_params] || {}
1518
+ query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
1519
+ query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
1520
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1521
+ query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
1522
+
1523
+ # header parameters
1524
+ header_params = opts[:header_params] || {}
1525
+ # HTTP header 'Accept' (if needed)
1526
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1527
+
1528
+ # form parameters
1529
+ form_params = opts[:form_params] || {}
1530
+
1531
+ # http body (model)
1532
+ post_body = opts[:debug_body]
1533
+
1534
+ # return_type
1535
+ return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
1536
+
1537
+ # auth_names
1538
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1539
+
1540
+ new_options = opts.merge(
1541
+ :operation => :"ScoreApi.get_user_likes",
1542
+ :header_params => header_params,
1543
+ :query_params => query_params,
1544
+ :form_params => form_params,
1545
+ :body => post_body,
1546
+ :auth_names => auth_names,
1547
+ :return_type => return_type
1548
+ )
1549
+
1550
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1551
+ if @api_client.config.debugging
1552
+ @api_client.config.logger.debug "API called: ScoreApi#get_user_likes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1553
+ end
1554
+ return data, status_code, headers
1555
+ end
1556
+
1234
1557
  # List user's scores
1235
- # Get the list of scores owned by the User
1236
- # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1558
+ # Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead.
1559
+ # @param user [String] Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1237
1560
  # @param [Hash] opts the optional parameters
1238
1561
  # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
1239
1562
  # @return [Array<ScoreDetails>]
1240
1563
  def get_user_scores(user, opts = {})
1241
1564
  data, _status_code, _headers = get_user_scores_with_http_info(user, opts)
1242
- return data
1565
+ data
1243
1566
  end
1244
1567
 
1245
1568
  # List user&#39;s scores
1246
- # Get the list of scores owned by the User
1247
- # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1569
+ # Get the list of public scores owned by a User. **DEPRECATED**: Please note that the current behavior will be deprecrated on **2019-01-01**. This method will no longer list private and shared scores, but only public scores of a Flat account. If you want to access to private scores, please use the [Collections API](#tag/Collection) instead.
1570
+ # @param user [String] Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1248
1571
  # @param [Hash] opts the optional parameters
1249
1572
  # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
1250
- # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
1573
+ # @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
1251
1574
  def get_user_scores_with_http_info(user, opts = {})
1252
1575
  if @api_client.config.debugging
1253
- @api_client.config.logger.debug "Calling API: ScoreApi.get_user_scores ..."
1576
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_user_scores ...'
1254
1577
  end
1255
1578
  # verify the required parameter 'user' is set
1256
1579
  if @api_client.config.client_side_validation && user.nil?
1257
1580
  fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_scores"
1258
1581
  end
1259
1582
  # resource path
1260
- local_var_path = "/users/{user}/scores".sub('{' + 'user' + '}', user.to_s)
1583
+ local_var_path = '/users/{user}/scores'.sub('{' + 'user' + '}', CGI.escape(user.to_s))
1261
1584
 
1262
1585
  # query parameters
1263
- query_params = {}
1586
+ query_params = opts[:query_params] || {}
1264
1587
  query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
1265
1588
 
1266
1589
  # header parameters
1267
- header_params = {}
1590
+ header_params = opts[:header_params] || {}
1268
1591
  # HTTP header 'Accept' (if needed)
1269
1592
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1270
- # HTTP header 'Content-Type'
1271
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1272
1593
 
1273
1594
  # form parameters
1274
- form_params = {}
1595
+ form_params = opts[:form_params] || {}
1275
1596
 
1276
1597
  # http body (model)
1277
- post_body = nil
1278
- auth_names = ['OAuth2']
1279
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1598
+ post_body = opts[:debug_body]
1599
+
1600
+ # return_type
1601
+ return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
1602
+
1603
+ # auth_names
1604
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1605
+
1606
+ new_options = opts.merge(
1607
+ :operation => :"ScoreApi.get_user_scores",
1280
1608
  :header_params => header_params,
1281
1609
  :query_params => query_params,
1282
1610
  :form_params => form_params,
1283
1611
  :body => post_body,
1284
1612
  :auth_names => auth_names,
1285
- :return_type => 'Array<ScoreDetails>')
1613
+ :return_type => return_type
1614
+ )
1615
+
1616
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1286
1617
  if @api_client.config.debugging
1287
1618
  @api_client.config.logger.debug "API called: ScoreApi#get_user_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1288
1619
  end
@@ -1290,57 +1621,69 @@ module FlatApi
1290
1621
  end
1291
1622
 
1292
1623
  # List the audio or video tracks linked to a score
1293
- #
1294
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1624
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1295
1625
  # @param [Hash] opts the optional parameters
1296
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1626
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1627
+ # @option opts [String] :assignment An assignment id with which all the tracks returned will be related to
1628
+ # @option opts [Boolean] :list_auto_track If true, and if available, return last automatically synchronized Flat&#39;s mp3 export as an additional track
1297
1629
  # @return [Array<ScoreTrack>]
1298
1630
  def list_score_tracks(score, opts = {})
1299
1631
  data, _status_code, _headers = list_score_tracks_with_http_info(score, opts)
1300
- return data
1632
+ data
1301
1633
  end
1302
1634
 
1303
1635
  # List the audio or video tracks linked to a score
1304
- #
1305
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1636
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1306
1637
  # @param [Hash] opts the optional parameters
1307
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1308
- # @return [Array<(Array<ScoreTrack>, Fixnum, Hash)>] Array<ScoreTrack> data, response status code and response headers
1638
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1639
+ # @option opts [String] :assignment An assignment id with which all the tracks returned will be related to
1640
+ # @option opts [Boolean] :list_auto_track If true, and if available, return last automatically synchronized Flat&#39;s mp3 export as an additional track
1641
+ # @return [Array<(Array<ScoreTrack>, Integer, Hash)>] Array<ScoreTrack> data, response status code and response headers
1309
1642
  def list_score_tracks_with_http_info(score, opts = {})
1310
1643
  if @api_client.config.debugging
1311
- @api_client.config.logger.debug "Calling API: ScoreApi.list_score_tracks ..."
1644
+ @api_client.config.logger.debug 'Calling API: ScoreApi.list_score_tracks ...'
1312
1645
  end
1313
1646
  # verify the required parameter 'score' is set
1314
1647
  if @api_client.config.client_side_validation && score.nil?
1315
1648
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.list_score_tracks"
1316
1649
  end
1317
1650
  # resource path
1318
- local_var_path = "/scores/{score}/tracks".sub('{' + 'score' + '}', score.to_s)
1651
+ local_var_path = '/scores/{score}/tracks'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
1319
1652
 
1320
1653
  # query parameters
1321
- query_params = {}
1654
+ query_params = opts[:query_params] || {}
1322
1655
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1656
+ query_params[:'assignment'] = opts[:'assignment'] if !opts[:'assignment'].nil?
1657
+ query_params[:'listAutoTrack'] = opts[:'list_auto_track'] if !opts[:'list_auto_track'].nil?
1323
1658
 
1324
1659
  # header parameters
1325
- header_params = {}
1660
+ header_params = opts[:header_params] || {}
1326
1661
  # HTTP header 'Accept' (if needed)
1327
1662
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1328
- # HTTP header 'Content-Type'
1329
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1330
1663
 
1331
1664
  # form parameters
1332
- form_params = {}
1665
+ form_params = opts[:form_params] || {}
1333
1666
 
1334
1667
  # http body (model)
1335
- post_body = nil
1336
- auth_names = ['OAuth2']
1337
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1668
+ post_body = opts[:debug_body]
1669
+
1670
+ # return_type
1671
+ return_type = opts[:debug_return_type] || 'Array<ScoreTrack>'
1672
+
1673
+ # auth_names
1674
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1675
+
1676
+ new_options = opts.merge(
1677
+ :operation => :"ScoreApi.list_score_tracks",
1338
1678
  :header_params => header_params,
1339
1679
  :query_params => query_params,
1340
1680
  :form_params => form_params,
1341
1681
  :body => post_body,
1342
1682
  :auth_names => auth_names,
1343
- :return_type => 'Array<ScoreTrack>')
1683
+ :return_type => return_type
1684
+ )
1685
+
1686
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1344
1687
  if @api_client.config.debugging
1345
1688
  @api_client.config.logger.debug "API called: ScoreApi#list_score_tracks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1346
1689
  end
@@ -1348,27 +1691,25 @@ module FlatApi
1348
1691
  end
1349
1692
 
1350
1693
  # Mark the comment as resolved
1351
- #
1352
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1353
- # @param comment Unique identifier of a sheet music comment
1694
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1695
+ # @param comment [String] Unique identifier of a sheet music comment
1354
1696
  # @param [Hash] opts the optional parameters
1355
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1697
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1356
1698
  # @return [nil]
1357
1699
  def mark_score_comment_resolved(score, comment, opts = {})
1358
1700
  mark_score_comment_resolved_with_http_info(score, comment, opts)
1359
- return nil
1701
+ nil
1360
1702
  end
1361
1703
 
1362
1704
  # Mark the comment as resolved
1363
- #
1364
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1365
- # @param comment Unique identifier of a sheet music comment
1705
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1706
+ # @param comment [String] Unique identifier of a sheet music comment
1366
1707
  # @param [Hash] opts the optional parameters
1367
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1368
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1708
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1709
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1369
1710
  def mark_score_comment_resolved_with_http_info(score, comment, opts = {})
1370
1711
  if @api_client.config.debugging
1371
- @api_client.config.logger.debug "Calling API: ScoreApi.mark_score_comment_resolved ..."
1712
+ @api_client.config.logger.debug 'Calling API: ScoreApi.mark_score_comment_resolved ...'
1372
1713
  end
1373
1714
  # verify the required parameter 'score' is set
1374
1715
  if @api_client.config.client_side_validation && score.nil?
@@ -1379,31 +1720,40 @@ module FlatApi
1379
1720
  fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_resolved"
1380
1721
  end
1381
1722
  # resource path
1382
- local_var_path = "/scores/{score}/comments/{comment}/resolved".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
1723
+ local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'comment' + '}', CGI.escape(comment.to_s))
1383
1724
 
1384
1725
  # query parameters
1385
- query_params = {}
1726
+ query_params = opts[:query_params] || {}
1386
1727
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1387
1728
 
1388
1729
  # header parameters
1389
- header_params = {}
1730
+ header_params = opts[:header_params] || {}
1390
1731
  # HTTP header 'Accept' (if needed)
1391
1732
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1392
- # HTTP header 'Content-Type'
1393
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1394
1733
 
1395
1734
  # form parameters
1396
- form_params = {}
1735
+ form_params = opts[:form_params] || {}
1397
1736
 
1398
1737
  # http body (model)
1399
- post_body = nil
1400
- auth_names = ['OAuth2']
1401
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1738
+ post_body = opts[:debug_body]
1739
+
1740
+ # return_type
1741
+ return_type = opts[:debug_return_type]
1742
+
1743
+ # auth_names
1744
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1745
+
1746
+ new_options = opts.merge(
1747
+ :operation => :"ScoreApi.mark_score_comment_resolved",
1402
1748
  :header_params => header_params,
1403
1749
  :query_params => query_params,
1404
1750
  :form_params => form_params,
1405
1751
  :body => post_body,
1406
- :auth_names => auth_names)
1752
+ :auth_names => auth_names,
1753
+ :return_type => return_type
1754
+ )
1755
+
1756
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1407
1757
  if @api_client.config.debugging
1408
1758
  @api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_resolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1409
1759
  end
@@ -1411,27 +1761,25 @@ module FlatApi
1411
1761
  end
1412
1762
 
1413
1763
  # Mark the comment as unresolved
1414
- #
1415
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1416
- # @param comment Unique identifier of a sheet music comment
1764
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1765
+ # @param comment [String] Unique identifier of a sheet music comment
1417
1766
  # @param [Hash] opts the optional parameters
1418
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1767
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1419
1768
  # @return [nil]
1420
1769
  def mark_score_comment_unresolved(score, comment, opts = {})
1421
1770
  mark_score_comment_unresolved_with_http_info(score, comment, opts)
1422
- return nil
1771
+ nil
1423
1772
  end
1424
1773
 
1425
1774
  # Mark the comment as unresolved
1426
- #
1427
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1428
- # @param comment Unique identifier of a sheet music comment
1775
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1776
+ # @param comment [String] Unique identifier of a sheet music comment
1429
1777
  # @param [Hash] opts the optional parameters
1430
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1431
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1778
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1779
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1432
1780
  def mark_score_comment_unresolved_with_http_info(score, comment, opts = {})
1433
1781
  if @api_client.config.debugging
1434
- @api_client.config.logger.debug "Calling API: ScoreApi.mark_score_comment_unresolved ..."
1782
+ @api_client.config.logger.debug 'Calling API: ScoreApi.mark_score_comment_unresolved ...'
1435
1783
  end
1436
1784
  # verify the required parameter 'score' is set
1437
1785
  if @api_client.config.client_side_validation && score.nil?
@@ -1442,31 +1790,40 @@ module FlatApi
1442
1790
  fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_unresolved"
1443
1791
  end
1444
1792
  # resource path
1445
- local_var_path = "/scores/{score}/comments/{comment}/resolved".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
1793
+ local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'comment' + '}', CGI.escape(comment.to_s))
1446
1794
 
1447
1795
  # query parameters
1448
- query_params = {}
1796
+ query_params = opts[:query_params] || {}
1449
1797
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1450
1798
 
1451
1799
  # header parameters
1452
- header_params = {}
1800
+ header_params = opts[:header_params] || {}
1453
1801
  # HTTP header 'Accept' (if needed)
1454
1802
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1455
- # HTTP header 'Content-Type'
1456
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1457
1803
 
1458
1804
  # form parameters
1459
- form_params = {}
1805
+ form_params = opts[:form_params] || {}
1460
1806
 
1461
1807
  # http body (model)
1462
- post_body = nil
1463
- auth_names = ['OAuth2']
1464
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1808
+ post_body = opts[:debug_body]
1809
+
1810
+ # return_type
1811
+ return_type = opts[:debug_return_type]
1812
+
1813
+ # auth_names
1814
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1815
+
1816
+ new_options = opts.merge(
1817
+ :operation => :"ScoreApi.mark_score_comment_unresolved",
1465
1818
  :header_params => header_params,
1466
1819
  :query_params => query_params,
1467
1820
  :form_params => form_params,
1468
1821
  :body => post_body,
1469
- :auth_names => auth_names)
1822
+ :auth_names => auth_names,
1823
+ :return_type => return_type
1824
+ )
1825
+
1826
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1470
1827
  if @api_client.config.debugging
1471
1828
  @api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_unresolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1472
1829
  end
@@ -1475,26 +1832,26 @@ module FlatApi
1475
1832
 
1476
1833
  # Post a new comment
1477
1834
  # Post a document or a contextualized comment on a document. Please note that this method includes an anti-spam system for public scores. We don't guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a `403` HTTP error and hidden from other users when the `spam` property is `true`.
1478
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1479
- # @param body
1835
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1836
+ # @param body [ScoreCommentCreation]
1480
1837
  # @param [Hash] opts the optional parameters
1481
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1838
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1482
1839
  # @return [ScoreComment]
1483
1840
  def post_score_comment(score, body, opts = {})
1484
1841
  data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts)
1485
- return data
1842
+ data
1486
1843
  end
1487
1844
 
1488
1845
  # Post a new comment
1489
1846
  # Post a document or a contextualized comment on a document. Please note that this method includes an anti-spam system for public scores. We don&#39;t guarantee that your comments will be accepted and displayed to end-user. Comments are be blocked by returning a &#x60;403&#x60; HTTP error and hidden from other users when the &#x60;spam&#x60; property is &#x60;true&#x60;.
1490
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1491
- # @param body
1847
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1848
+ # @param body [ScoreCommentCreation]
1492
1849
  # @param [Hash] opts the optional parameters
1493
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1494
- # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
1850
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1851
+ # @return [Array<(ScoreComment, Integer, Hash)>] ScoreComment data, response status code and response headers
1495
1852
  def post_score_comment_with_http_info(score, body, opts = {})
1496
1853
  if @api_client.config.debugging
1497
- @api_client.config.logger.debug "Calling API: ScoreApi.post_score_comment ..."
1854
+ @api_client.config.logger.debug 'Calling API: ScoreApi.post_score_comment ...'
1498
1855
  end
1499
1856
  # verify the required parameter 'score' is set
1500
1857
  if @api_client.config.client_side_validation && score.nil?
@@ -1505,32 +1862,45 @@ module FlatApi
1505
1862
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.post_score_comment"
1506
1863
  end
1507
1864
  # resource path
1508
- local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)
1865
+ local_var_path = '/scores/{score}/comments'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
1509
1866
 
1510
1867
  # query parameters
1511
- query_params = {}
1868
+ query_params = opts[:query_params] || {}
1512
1869
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1513
1870
 
1514
1871
  # header parameters
1515
- header_params = {}
1872
+ header_params = opts[:header_params] || {}
1516
1873
  # HTTP header 'Accept' (if needed)
1517
1874
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1518
1875
  # HTTP header 'Content-Type'
1519
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1876
+ content_type = @api_client.select_header_content_type(['application/json'])
1877
+ if !content_type.nil?
1878
+ header_params['Content-Type'] = content_type
1879
+ end
1520
1880
 
1521
1881
  # form parameters
1522
- form_params = {}
1882
+ form_params = opts[:form_params] || {}
1523
1883
 
1524
1884
  # http body (model)
1525
- post_body = @api_client.object_to_http_body(body)
1526
- auth_names = ['OAuth2']
1527
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1885
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
1886
+
1887
+ # return_type
1888
+ return_type = opts[:debug_return_type] || 'ScoreComment'
1889
+
1890
+ # auth_names
1891
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1892
+
1893
+ new_options = opts.merge(
1894
+ :operation => :"ScoreApi.post_score_comment",
1528
1895
  :header_params => header_params,
1529
1896
  :query_params => query_params,
1530
1897
  :form_params => form_params,
1531
1898
  :body => post_body,
1532
1899
  :auth_names => auth_names,
1533
- :return_type => 'ScoreComment')
1900
+ :return_type => return_type
1901
+ )
1902
+
1903
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1534
1904
  if @api_client.config.debugging
1535
1905
  @api_client.config.logger.debug "API called: ScoreApi#post_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1536
1906
  end
@@ -1539,24 +1909,24 @@ module FlatApi
1539
1909
 
1540
1910
  # Delete a collaborator
1541
1911
  # Remove the specified collaborator from the score
1542
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1543
- # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1912
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1913
+ # @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1544
1914
  # @param [Hash] opts the optional parameters
1545
1915
  # @return [nil]
1546
1916
  def remove_score_collaborator(score, collaborator, opts = {})
1547
1917
  remove_score_collaborator_with_http_info(score, collaborator, opts)
1548
- return nil
1918
+ nil
1549
1919
  end
1550
1920
 
1551
1921
  # Delete a collaborator
1552
1922
  # Remove the specified collaborator from the score
1553
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1554
- # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1923
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1924
+ # @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1555
1925
  # @param [Hash] opts the optional parameters
1556
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1926
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1557
1927
  def remove_score_collaborator_with_http_info(score, collaborator, opts = {})
1558
1928
  if @api_client.config.debugging
1559
- @api_client.config.logger.debug "Calling API: ScoreApi.remove_score_collaborator ..."
1929
+ @api_client.config.logger.debug 'Calling API: ScoreApi.remove_score_collaborator ...'
1560
1930
  end
1561
1931
  # verify the required parameter 'score' is set
1562
1932
  if @api_client.config.client_side_validation && score.nil?
@@ -1567,60 +1937,130 @@ module FlatApi
1567
1937
  fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.remove_score_collaborator"
1568
1938
  end
1569
1939
  # resource path
1570
- local_var_path = "/scores/{score}/collaborators/{collaborator}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'collaborator' + '}', collaborator.to_s)
1940
+ local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'collaborator' + '}', CGI.escape(collaborator.to_s))
1571
1941
 
1572
1942
  # query parameters
1573
- query_params = {}
1943
+ query_params = opts[:query_params] || {}
1574
1944
 
1575
1945
  # header parameters
1576
- header_params = {}
1946
+ header_params = opts[:header_params] || {}
1577
1947
  # HTTP header 'Accept' (if needed)
1578
1948
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1579
- # HTTP header 'Content-Type'
1580
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1581
1949
 
1582
1950
  # form parameters
1583
- form_params = {}
1951
+ form_params = opts[:form_params] || {}
1584
1952
 
1585
1953
  # http body (model)
1586
- post_body = nil
1587
- auth_names = ['OAuth2']
1588
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1954
+ post_body = opts[:debug_body]
1955
+
1956
+ # return_type
1957
+ return_type = opts[:debug_return_type]
1958
+
1959
+ # auth_names
1960
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1961
+
1962
+ new_options = opts.merge(
1963
+ :operation => :"ScoreApi.remove_score_collaborator",
1589
1964
  :header_params => header_params,
1590
1965
  :query_params => query_params,
1591
1966
  :form_params => form_params,
1592
1967
  :body => post_body,
1593
- :auth_names => auth_names)
1968
+ :auth_names => auth_names,
1969
+ :return_type => return_type
1970
+ )
1971
+
1972
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1594
1973
  if @api_client.config.debugging
1595
1974
  @api_client.config.logger.debug "API called: ScoreApi#remove_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1596
1975
  end
1597
1976
  return data, status_code, headers
1598
1977
  end
1599
1978
 
1979
+ # Untrash a score
1980
+ # This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections.
1981
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1982
+ # @param [Hash] opts the optional parameters
1983
+ # @return [nil]
1984
+ def untrash_score(score, opts = {})
1985
+ untrash_score_with_http_info(score, opts)
1986
+ nil
1987
+ end
1988
+
1989
+ # Untrash a score
1990
+ # This method will remove the score from the &#x60;trash&#x60; collection and from the deletion queue, and add it back to the original collections.
1991
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1992
+ # @param [Hash] opts the optional parameters
1993
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1994
+ def untrash_score_with_http_info(score, opts = {})
1995
+ if @api_client.config.debugging
1996
+ @api_client.config.logger.debug 'Calling API: ScoreApi.untrash_score ...'
1997
+ end
1998
+ # verify the required parameter 'score' is set
1999
+ if @api_client.config.client_side_validation && score.nil?
2000
+ fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.untrash_score"
2001
+ end
2002
+ # resource path
2003
+ local_var_path = '/scores/{score}/untrash'.sub('{' + 'score' + '}', CGI.escape(score.to_s))
2004
+
2005
+ # query parameters
2006
+ query_params = opts[:query_params] || {}
2007
+
2008
+ # header parameters
2009
+ header_params = opts[:header_params] || {}
2010
+ # HTTP header 'Accept' (if needed)
2011
+ header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2012
+
2013
+ # form parameters
2014
+ form_params = opts[:form_params] || {}
2015
+
2016
+ # http body (model)
2017
+ post_body = opts[:debug_body]
2018
+
2019
+ # return_type
2020
+ return_type = opts[:debug_return_type]
2021
+
2022
+ # auth_names
2023
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
2024
+
2025
+ new_options = opts.merge(
2026
+ :operation => :"ScoreApi.untrash_score",
2027
+ :header_params => header_params,
2028
+ :query_params => query_params,
2029
+ :form_params => form_params,
2030
+ :body => post_body,
2031
+ :auth_names => auth_names,
2032
+ :return_type => return_type
2033
+ )
2034
+
2035
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
2036
+ if @api_client.config.debugging
2037
+ @api_client.config.logger.debug "API called: ScoreApi#untrash_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
2038
+ end
2039
+ return data, status_code, headers
2040
+ end
2041
+
1600
2042
  # Update an existing comment
1601
- #
1602
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1603
- # @param comment Unique identifier of a sheet music comment
1604
- # @param body
2043
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
2044
+ # @param comment [String] Unique identifier of a sheet music comment
2045
+ # @param body [ScoreCommentUpdate]
1605
2046
  # @param [Hash] opts the optional parameters
1606
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
2047
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1607
2048
  # @return [ScoreComment]
1608
2049
  def update_score_comment(score, comment, body, opts = {})
1609
2050
  data, _status_code, _headers = update_score_comment_with_http_info(score, comment, body, opts)
1610
- return data
2051
+ data
1611
2052
  end
1612
2053
 
1613
2054
  # Update an existing comment
1614
- #
1615
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1616
- # @param comment Unique identifier of a sheet music comment
1617
- # @param body
2055
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
2056
+ # @param comment [String] Unique identifier of a sheet music comment
2057
+ # @param body [ScoreCommentUpdate]
1618
2058
  # @param [Hash] opts the optional parameters
1619
- # @option opts [String] :sharing_key This sharing key must be specified to access to a score with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
1620
- # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
2059
+ # @option opts [String] :sharing_key This sharing key must be specified to access to a score or collection with a &#x60;privacy&#x60; mode set to &#x60;privateLink&#x60; and the current user is not a collaborator of the document.
2060
+ # @return [Array<(ScoreComment, Integer, Hash)>] ScoreComment data, response status code and response headers
1621
2061
  def update_score_comment_with_http_info(score, comment, body, opts = {})
1622
2062
  if @api_client.config.debugging
1623
- @api_client.config.logger.debug "Calling API: ScoreApi.update_score_comment ..."
2063
+ @api_client.config.logger.debug 'Calling API: ScoreApi.update_score_comment ...'
1624
2064
  end
1625
2065
  # verify the required parameter 'score' is set
1626
2066
  if @api_client.config.client_side_validation && score.nil?
@@ -1635,32 +2075,45 @@ module FlatApi
1635
2075
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_comment"
1636
2076
  end
1637
2077
  # resource path
1638
- local_var_path = "/scores/{score}/comments/{comment}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
2078
+ local_var_path = '/scores/{score}/comments/{comment}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'comment' + '}', CGI.escape(comment.to_s))
1639
2079
 
1640
2080
  # query parameters
1641
- query_params = {}
2081
+ query_params = opts[:query_params] || {}
1642
2082
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1643
2083
 
1644
2084
  # header parameters
1645
- header_params = {}
2085
+ header_params = opts[:header_params] || {}
1646
2086
  # HTTP header 'Accept' (if needed)
1647
2087
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1648
2088
  # HTTP header 'Content-Type'
1649
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2089
+ content_type = @api_client.select_header_content_type(['application/json'])
2090
+ if !content_type.nil?
2091
+ header_params['Content-Type'] = content_type
2092
+ end
1650
2093
 
1651
2094
  # form parameters
1652
- form_params = {}
2095
+ form_params = opts[:form_params] || {}
1653
2096
 
1654
2097
  # http body (model)
1655
- post_body = @api_client.object_to_http_body(body)
1656
- auth_names = ['OAuth2']
1657
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2098
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
2099
+
2100
+ # return_type
2101
+ return_type = opts[:debug_return_type] || 'ScoreComment'
2102
+
2103
+ # auth_names
2104
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
2105
+
2106
+ new_options = opts.merge(
2107
+ :operation => :"ScoreApi.update_score_comment",
1658
2108
  :header_params => header_params,
1659
2109
  :query_params => query_params,
1660
2110
  :form_params => form_params,
1661
2111
  :body => post_body,
1662
2112
  :auth_names => auth_names,
1663
- :return_type => 'ScoreComment')
2113
+ :return_type => return_type
2114
+ )
2115
+
2116
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1664
2117
  if @api_client.config.debugging
1665
2118
  @api_client.config.logger.debug "API called: ScoreApi#update_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1666
2119
  end
@@ -1668,27 +2121,25 @@ module FlatApi
1668
2121
  end
1669
2122
 
1670
2123
  # Update an audio or video track linked to a score
1671
- #
1672
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1673
- # @param track Unique identifier of a score audio track
1674
- # @param body
2124
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
2125
+ # @param track [String] Unique identifier of a score audio track
2126
+ # @param body [ScoreTrackUpdate]
1675
2127
  # @param [Hash] opts the optional parameters
1676
2128
  # @return [ScoreTrack]
1677
2129
  def update_score_track(score, track, body, opts = {})
1678
2130
  data, _status_code, _headers = update_score_track_with_http_info(score, track, body, opts)
1679
- return data
2131
+ data
1680
2132
  end
1681
2133
 
1682
2134
  # Update an audio or video track linked to a score
1683
- #
1684
- # @param score Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
1685
- # @param track Unique identifier of a score audio track
1686
- # @param body
2135
+ # @param score [String] Unique identifier of the score document. This can be a Flat Score unique identifier (i.e. &#x60;ScoreDetails.id&#x60;) or, if the score is also a Google Drive file, the Drive file unique identifier prefixed with &#x60;drive-&#x60; (e.g. &#x60;drive-0B000000000&#x60;).
2136
+ # @param track [String] Unique identifier of a score audio track
2137
+ # @param body [ScoreTrackUpdate]
1687
2138
  # @param [Hash] opts the optional parameters
1688
- # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
2139
+ # @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
1689
2140
  def update_score_track_with_http_info(score, track, body, opts = {})
1690
2141
  if @api_client.config.debugging
1691
- @api_client.config.logger.debug "Calling API: ScoreApi.update_score_track ..."
2142
+ @api_client.config.logger.debug 'Calling API: ScoreApi.update_score_track ...'
1692
2143
  end
1693
2144
  # verify the required parameter 'score' is set
1694
2145
  if @api_client.config.client_side_validation && score.nil?
@@ -1703,31 +2154,44 @@ module FlatApi
1703
2154
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_track"
1704
2155
  end
1705
2156
  # resource path
1706
- local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)
2157
+ local_var_path = '/scores/{score}/tracks/{track}'.sub('{' + 'score' + '}', CGI.escape(score.to_s)).sub('{' + 'track' + '}', CGI.escape(track.to_s))
1707
2158
 
1708
2159
  # query parameters
1709
- query_params = {}
2160
+ query_params = opts[:query_params] || {}
1710
2161
 
1711
2162
  # header parameters
1712
- header_params = {}
2163
+ header_params = opts[:header_params] || {}
1713
2164
  # HTTP header 'Accept' (if needed)
1714
2165
  header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1715
2166
  # HTTP header 'Content-Type'
1716
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2167
+ content_type = @api_client.select_header_content_type(['application/json'])
2168
+ if !content_type.nil?
2169
+ header_params['Content-Type'] = content_type
2170
+ end
1717
2171
 
1718
2172
  # form parameters
1719
- form_params = {}
2173
+ form_params = opts[:form_params] || {}
1720
2174
 
1721
2175
  # http body (model)
1722
- post_body = @api_client.object_to_http_body(body)
1723
- auth_names = ['OAuth2']
1724
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2176
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
2177
+
2178
+ # return_type
2179
+ return_type = opts[:debug_return_type] || 'ScoreTrack'
2180
+
2181
+ # auth_names
2182
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
2183
+
2184
+ new_options = opts.merge(
2185
+ :operation => :"ScoreApi.update_score_track",
1725
2186
  :header_params => header_params,
1726
2187
  :query_params => query_params,
1727
2188
  :form_params => form_params,
1728
2189
  :body => post_body,
1729
2190
  :auth_names => auth_names,
1730
- :return_type => 'ScoreTrack')
2191
+ :return_type => return_type
2192
+ )
2193
+
2194
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1731
2195
  if @api_client.config.debugging
1732
2196
  @api_client.config.logger.debug "API called: ScoreApi#update_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1733
2197
  end