flat_api 0.2.0 → 1.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (410) hide show
  1. checksums.yaml +5 -5
  2. data/CHANGELOG.md +60 -8
  3. data/LICENSE +201 -0
  4. data/README.md +62 -241
  5. data/lib/flat_api/api/account_api.rb +32 -22
  6. data/lib/flat_api/api/class_api.rb +1671 -453
  7. data/lib/flat_api/api/collection_api.rb +286 -185
  8. data/lib/flat_api/api/edu_resources_api.rb +863 -0
  9. data/lib/flat_api/api/group_api.rb +506 -57
  10. data/lib/flat_api/api/omr_api.rb +894 -0
  11. data/lib/flat_api/api/organization_api.rb +808 -192
  12. data/lib/flat_api/api/score_api.rb +1030 -589
  13. data/lib/flat_api/api/task_api.rb +85 -0
  14. data/lib/flat_api/api/user_api.rb +151 -82
  15. data/lib/flat_api/api_client.rb +223 -145
  16. data/lib/flat_api/api_error.rb +24 -4
  17. data/lib/flat_api/api_model_base.rb +88 -0
  18. data/lib/flat_api/client.rb +69 -0
  19. data/lib/flat_api/configuration.rb +224 -36
  20. data/lib/flat_api/errors.rb +86 -0
  21. data/lib/flat_api/models/add_group_user200_response.rb +148 -0
  22. data/lib/flat_api/models/add_group_user_request.rb +165 -0
  23. data/lib/flat_api/models/api_access_token.rb +201 -0
  24. data/lib/flat_api/models/app_scopes.rb +61 -0
  25. data/lib/flat_api/models/assignment.rb +362 -166
  26. data/lib/flat_api/models/assignment_capabilities.rb +256 -0
  27. data/lib/flat_api/models/assignment_capabilities_can_publish_in_class_error.rb +193 -0
  28. data/lib/flat_api/models/assignment_copy.rb +79 -169
  29. data/lib/flat_api/models/assignment_copy_response.rb +535 -0
  30. data/lib/flat_api/models/assignment_copy_to_class.rb +186 -0
  31. data/lib/flat_api/models/assignment_copy_to_resource_library.rb +176 -0
  32. data/lib/flat_api/models/assignment_group.rb +232 -0
  33. data/lib/flat_api/models/assignment_submission.rb +337 -131
  34. data/lib/flat_api/models/assignment_submission_comment.rb +209 -0
  35. data/lib/flat_api/models/assignment_submission_comment_creation.rb +166 -0
  36. data/lib/flat_api/models/assignment_submission_comments.rb +158 -0
  37. data/lib/flat_api/models/assignment_submission_history.rb +337 -0
  38. data/lib/flat_api/models/assignment_submission_history_attachment.rb +168 -0
  39. data/lib/flat_api/models/assignment_submission_history_state.rb +43 -0
  40. data/lib/flat_api/models/assignment_submission_lti.rb +200 -0
  41. data/lib/flat_api/models/assignment_submission_playback.rb +193 -0
  42. data/lib/flat_api/models/assignment_submission_state.rb +42 -0
  43. data/lib/flat_api/models/assignment_submission_students_mode.rb +40 -0
  44. data/lib/flat_api/models/assignment_submission_update.rb +157 -113
  45. data/lib/flat_api/models/assignment_type.rb +45 -0
  46. data/lib/flat_api/models/assignment_update.rb +538 -0
  47. data/lib/flat_api/models/class_assignment.rb +750 -0
  48. data/lib/flat_api/models/class_assignment_all_of_canvas.rb +159 -0
  49. data/lib/flat_api/models/class_assignment_all_of_lti.rb +149 -0
  50. data/lib/flat_api/models/class_assignment_all_of_mfc.rb +159 -0
  51. data/lib/flat_api/models/class_assignment_update.rb +652 -0
  52. data/lib/flat_api/models/class_assignment_update_all_of_google_classroom.rb +150 -0
  53. data/lib/flat_api/models/class_assignment_update_all_of_microsoft_graph.rb +152 -0
  54. data/lib/flat_api/models/class_attachment_creation.rb +140 -106
  55. data/lib/flat_api/models/class_creation.rb +142 -108
  56. data/lib/flat_api/models/class_details.rb +244 -125
  57. data/lib/flat_api/models/class_details_canvas.rb +59 -99
  58. data/lib/flat_api/models/class_details_clever.rb +74 -113
  59. data/lib/flat_api/models/class_details_google_classroom.rb +64 -124
  60. data/lib/flat_api/models/class_details_google_drive.rb +61 -101
  61. data/lib/flat_api/models/class_details_issues.rb +151 -0
  62. data/lib/flat_api/models/class_details_issues_sync_inner.rb +203 -0
  63. data/lib/flat_api/models/class_details_lti.rb +76 -106
  64. data/lib/flat_api/models/class_details_mfc.rb +159 -0
  65. data/lib/flat_api/models/class_details_microsoft_graph.rb +148 -0
  66. data/lib/flat_api/models/class_grade_level.rb +43 -0
  67. data/lib/flat_api/models/class_roles.rb +18 -9
  68. data/lib/flat_api/models/class_state.rb +19 -9
  69. data/lib/flat_api/models/class_update.rb +142 -107
  70. data/lib/flat_api/models/collection.rb +304 -115
  71. data/lib/flat_api/models/collection_app.rb +169 -0
  72. data/lib/flat_api/models/collection_capabilities.rb +157 -112
  73. data/lib/flat_api/models/collection_contents.rb +166 -0
  74. data/lib/flat_api/models/collection_creation.rb +120 -104
  75. data/lib/flat_api/models/collection_modification.rb +122 -100
  76. data/lib/flat_api/models/collection_privacy.rb +18 -9
  77. data/lib/flat_api/models/collection_type.rb +22 -11
  78. data/lib/flat_api/models/credit_transaction.rb +388 -0
  79. data/lib/flat_api/models/edu_library.rb +273 -0
  80. data/lib/flat_api/models/edu_resource.rb +383 -0
  81. data/lib/flat_api/models/edu_resource_assignment_creation.rb +170 -0
  82. data/lib/flat_api/models/edu_resource_capabilities.rb +179 -0
  83. data/lib/flat_api/models/edu_resource_copy.rb +166 -0
  84. data/lib/flat_api/models/edu_resource_creation.rb +311 -0
  85. data/lib/flat_api/models/edu_resource_folder.rb +171 -0
  86. data/lib/flat_api/models/edu_resource_lti_link.rb +166 -0
  87. data/lib/flat_api/models/edu_resource_move.rb +166 -0
  88. data/lib/flat_api/models/edu_resource_privacy.rb +41 -0
  89. data/lib/flat_api/models/edu_resource_resource.rb +104 -0
  90. data/lib/flat_api/models/edu_resource_type.rb +40 -0
  91. data/lib/flat_api/models/edu_resource_update.rb +292 -0
  92. data/lib/flat_api/models/edu_resource_use_in_class.rb +176 -0
  93. data/lib/flat_api/models/flat_error_response.rb +109 -105
  94. data/lib/flat_api/models/google_classroom_coursework.rb +74 -103
  95. data/lib/flat_api/models/google_classroom_submission.rb +112 -101
  96. data/lib/flat_api/models/grade.rb +51 -0
  97. data/lib/flat_api/models/group.rb +70 -122
  98. data/lib/flat_api/models/group_creation.rb +238 -0
  99. data/lib/flat_api/models/group_details.rb +253 -110
  100. data/lib/flat_api/models/group_type.rb +20 -9
  101. data/lib/flat_api/models/license_mode.rb +18 -9
  102. data/lib/flat_api/models/license_sources.rb +21 -9
  103. data/lib/flat_api/models/lms_name.rb +19 -9
  104. data/lib/flat_api/models/lti_configuration.rb +56 -0
  105. data/lib/flat_api/models/lti_configuration1p1.rb +361 -0
  106. data/lib/flat_api/models/lti_configuration1p1_all_of_tool.rb +199 -0
  107. data/lib/flat_api/models/lti_configuration1p3.rb +106 -0
  108. data/lib/flat_api/models/lti_configuration1p3_base.rb +336 -0
  109. data/lib/flat_api/models/lti_configuration1p3_base_supported_services.rb +166 -0
  110. data/lib/flat_api/models/lti_configuration1p3_base_supported_services_ags.rb +179 -0
  111. data/lib/flat_api/models/lti_configuration1p3_base_supported_services_deep_linking.rb +159 -0
  112. data/lib/flat_api/models/lti_configuration1p3_base_supported_services_nrps.rb +169 -0
  113. data/lib/flat_api/models/lti_configuration1p3_base_tool.rb +199 -0
  114. data/lib/flat_api/models/lti_configuration1p3_deployment.rb +529 -0
  115. data/lib/flat_api/models/lti_configuration1p3_dynamic.rb +530 -0
  116. data/lib/flat_api/models/lti_configuration1p3_manual.rb +489 -0
  117. data/lib/flat_api/models/lti_configuration_base.rb +306 -0
  118. data/lib/flat_api/models/lti_configuration_create.rb +60 -0
  119. data/lib/flat_api/models/lti_configuration_create1p1.rb +210 -0
  120. data/lib/flat_api/models/lti_configuration_create1p3_deployment.rb +264 -0
  121. data/lib/flat_api/models/lti_configuration_create1p3_dynamic.rb +209 -0
  122. data/lib/flat_api/models/lti_configuration_create1p3_dynamic_platform_info.rb +159 -0
  123. data/lib/flat_api/models/lti_configuration_create1p3_manual.rb +270 -0
  124. data/lib/flat_api/models/lti_configuration_update.rb +104 -0
  125. data/lib/flat_api/models/lti_configuration_update_deployment.rb +169 -0
  126. data/lib/flat_api/models/lti_configuration_update_standalone.rb +219 -0
  127. data/lib/flat_api/models/lti_credentials.rb +108 -114
  128. data/lib/flat_api/models/lti_credentials_creation.rb +99 -103
  129. data/lib/flat_api/models/media_attachment.rb +189 -137
  130. data/lib/flat_api/models/media_score_sharing_mode.rb +19 -9
  131. data/lib/flat_api/models/microsoft_graph_assignment.rb +259 -0
  132. data/lib/flat_api/models/microsoft_graph_submission.rb +193 -0
  133. data/lib/flat_api/models/omr_capabilities.rb +480 -0
  134. data/lib/flat_api/models/omr_details_step_data.rb +228 -0
  135. data/lib/flat_api/models/omr_details_submission.rb +288 -0
  136. data/lib/flat_api/models/omr_detected_instrument.rb +260 -0
  137. data/lib/flat_api/models/omr_imported_metadata.rb +181 -0
  138. data/lib/flat_api/models/omr_instrument_override.rb +311 -0
  139. data/lib/flat_api/models/omr_job.rb +394 -0
  140. data/lib/flat_api/models/omr_job_creation.rb +238 -0
  141. data/lib/flat_api/models/omr_job_file_metadata.rb +199 -0
  142. data/lib/flat_api/models/omr_job_file_upload.rb +176 -0
  143. data/lib/flat_api/models/omr_job_file_upload_result.rb +159 -0
  144. data/lib/flat_api/models/omr_job_input_file.rb +176 -0
  145. data/lib/flat_api/models/omr_job_output.rb +40 -0
  146. data/lib/flat_api/models/omr_job_progress.rb +169 -0
  147. data/lib/flat_api/models/omr_job_result.rb +161 -0
  148. data/lib/flat_api/models/omr_job_retention.rb +176 -0
  149. data/lib/flat_api/models/omr_job_status.rb +44 -0
  150. data/lib/flat_api/models/omr_locale_details.rb +193 -0
  151. data/lib/flat_api/models/omr_pending_step.rb +213 -0
  152. data/lib/flat_api/models/omr_step_name.rb +39 -0
  153. data/lib/flat_api/models/organization_invitation.rb +177 -109
  154. data/lib/flat_api/models/organization_invitation_creation.rb +97 -100
  155. data/lib/flat_api/models/organization_roles.rb +19 -10
  156. data/lib/flat_api/models/organization_user_access_token_creation.rb +168 -0
  157. data/lib/flat_api/models/rename_group_request.rb +165 -0
  158. data/lib/flat_api/models/resource_collaborator.rb +204 -116
  159. data/lib/flat_api/models/resource_collaborator_creation.rb +72 -112
  160. data/lib/flat_api/models/resource_rights.rb +168 -107
  161. data/lib/flat_api/models/score_comment.rb +200 -121
  162. data/lib/flat_api/models/score_comment_context.rb +161 -124
  163. data/lib/flat_api/models/score_comment_creation.rb +79 -107
  164. data/lib/flat_api/models/score_comment_moderation.rb +193 -0
  165. data/lib/flat_api/models/score_comment_update.rb +81 -115
  166. data/lib/flat_api/models/score_comments_counts.rb +78 -108
  167. data/lib/flat_api/models/score_creation.rb +80 -225
  168. data/lib/flat_api/models/score_creation_builder_data.rb +234 -0
  169. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data.rb +173 -0
  170. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_layout_data.rb +255 -0
  171. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data.rb +217 -0
  172. data/lib/flat_api/models/score_creation_builder_data_all_of_builder_data_score_data_instruments.rb +222 -0
  173. data/lib/flat_api/models/score_creation_common.rb +201 -0
  174. data/lib/flat_api/models/score_creation_file_import.rb +277 -0
  175. data/lib/flat_api/models/score_creation_google_drive_import.rb +234 -0
  176. data/lib/flat_api/models/score_creation_type.rb +18 -9
  177. data/lib/flat_api/models/score_details.rb +428 -146
  178. data/lib/flat_api/models/score_details_all_of_me.rb +193 -0
  179. data/lib/flat_api/models/score_fork.rb +84 -101
  180. data/lib/flat_api/models/score_license.rb +18 -9
  181. data/lib/flat_api/models/score_likes_counts.rb +73 -103
  182. data/lib/flat_api/models/score_modification.rb +178 -115
  183. data/lib/flat_api/models/score_plays_counts.rb +179 -0
  184. data/lib/flat_api/models/score_privacy.rb +18 -9
  185. data/lib/flat_api/models/score_revision.rb +142 -111
  186. data/lib/flat_api/models/score_revision_creation.rb +113 -105
  187. data/lib/flat_api/models/score_revision_statistics.rb +81 -101
  188. data/lib/flat_api/models/score_source.rb +59 -100
  189. data/lib/flat_api/models/score_summary.rb +172 -105
  190. data/lib/flat_api/models/score_track.rb +244 -117
  191. data/lib/flat_api/models/score_track_creation.rb +99 -104
  192. data/lib/flat_api/models/score_track_creation_response.rb +165 -0
  193. data/lib/flat_api/models/score_track_point.rb +78 -103
  194. data/lib/flat_api/models/score_track_purpose.rb +40 -0
  195. data/lib/flat_api/models/score_track_state.rb +18 -9
  196. data/lib/flat_api/models/score_track_type.rb +18 -9
  197. data/lib/flat_api/models/score_track_update.rb +98 -103
  198. data/lib/flat_api/models/score_views_counts.rb +73 -103
  199. data/lib/flat_api/models/task.rb +339 -0
  200. data/lib/flat_api/models/task_export_options.rb +151 -0
  201. data/lib/flat_api/models/task_progress.rb +159 -0
  202. data/lib/flat_api/models/task_result.rb +159 -0
  203. data/lib/flat_api/models/teaching_theme.rb +47 -0
  204. data/lib/flat_api/models/tutteo_product.rb +42 -0
  205. data/lib/flat_api/models/user_admin_update.rb +206 -106
  206. data/lib/flat_api/models/user_azure_details.rb +168 -0
  207. data/lib/flat_api/models/user_basics.rb +215 -120
  208. data/lib/flat_api/models/user_community_profile_links.rb +205 -0
  209. data/lib/flat_api/models/user_creation.rb +203 -114
  210. data/lib/flat_api/models/user_details.rb +331 -161
  211. data/lib/flat_api/models/user_details_admin.rb +272 -133
  212. data/lib/flat_api/models/user_details_admin_all_of_license.rb +211 -0
  213. data/lib/flat_api/models/user_public.rb +303 -145
  214. data/lib/flat_api/models/user_public_summary.rb +243 -126
  215. data/lib/flat_api/models/user_signin_link.rb +168 -0
  216. data/lib/flat_api/models/user_signin_link_creation.rb +150 -0
  217. data/lib/flat_api/oauth.rb +128 -0
  218. data/lib/flat_api/pagination.rb +88 -0
  219. data/lib/flat_api/retry.rb +56 -0
  220. data/lib/flat_api/version.rb +5 -5
  221. data/lib/flat_api.rb +144 -16
  222. metadata +154 -434
  223. data/Gemfile +0 -7
  224. data/Rakefile +0 -8
  225. data/docs/AccountApi.md +0 -55
  226. data/docs/Assignment.md +0 -18
  227. data/docs/AssignmentCopy.md +0 -8
  228. data/docs/AssignmentCreation.md +0 -12
  229. data/docs/AssignmentSubmission.md +0 -19
  230. data/docs/AssignmentSubmissionUpdate.md +0 -11
  231. data/docs/ClassApi.md +0 -1051
  232. data/docs/ClassAttachmentCreation.md +0 -10
  233. data/docs/ClassCreation.md +0 -9
  234. data/docs/ClassDetails.md +0 -25
  235. data/docs/ClassDetailsCanvas.md +0 -9
  236. data/docs/ClassDetailsClever.md +0 -14
  237. data/docs/ClassDetailsGoogleClassroom.md +0 -11
  238. data/docs/ClassDetailsGoogleDrive.md +0 -9
  239. data/docs/ClassDetailsLti.md +0 -10
  240. data/docs/ClassRoles.md +0 -7
  241. data/docs/ClassState.md +0 -7
  242. data/docs/ClassUpdate.md +0 -9
  243. data/docs/Collection.md +0 -18
  244. data/docs/CollectionApi.md +0 -521
  245. data/docs/CollectionCapabilities.md +0 -12
  246. data/docs/CollectionCreation.md +0 -8
  247. data/docs/CollectionModification.md +0 -8
  248. data/docs/CollectionPrivacy.md +0 -7
  249. data/docs/CollectionTitle.md +0 -7
  250. data/docs/CollectionType.md +0 -7
  251. data/docs/FlatErrorResponse.md +0 -11
  252. data/docs/FlatLocales.md +0 -7
  253. data/docs/GoogleClassroomCoursework.md +0 -10
  254. data/docs/GoogleClassroomSubmission.md +0 -10
  255. data/docs/Group.md +0 -14
  256. data/docs/GroupApi.md +0 -167
  257. data/docs/GroupDetails.md +0 -14
  258. data/docs/GroupType.md +0 -7
  259. data/docs/LicenseMode.md +0 -7
  260. data/docs/LicenseSources.md +0 -7
  261. data/docs/LmsName.md +0 -7
  262. data/docs/LtiCredentials.md +0 -16
  263. data/docs/LtiCredentialsCreation.md +0 -9
  264. data/docs/MediaAttachment.md +0 -23
  265. data/docs/MediaScoreSharingMode.md +0 -7
  266. data/docs/OrganizationApi.md +0 -538
  267. data/docs/OrganizationInvitation.md +0 -14
  268. data/docs/OrganizationInvitationCreation.md +0 -9
  269. data/docs/OrganizationRoles.md +0 -7
  270. data/docs/ResourceCollaborator.md +0 -16
  271. data/docs/ResourceCollaboratorCreation.md +0 -14
  272. data/docs/ResourceRights.md +0 -10
  273. data/docs/ResourceSharingKey.md +0 -7
  274. data/docs/ScoreApi.md +0 -1658
  275. data/docs/ScoreComment.md +0 -22
  276. data/docs/ScoreCommentContext.md +0 -14
  277. data/docs/ScoreCommentCreation.md +0 -13
  278. data/docs/ScoreCommentUpdate.md +0 -11
  279. data/docs/ScoreCommentsCounts.md +0 -11
  280. data/docs/ScoreCreation.md +0 -14
  281. data/docs/ScoreCreationType.md +0 -7
  282. data/docs/ScoreData.md +0 -7
  283. data/docs/ScoreDataEncoding.md +0 -7
  284. data/docs/ScoreDetails.md +0 -36
  285. data/docs/ScoreFork.md +0 -8
  286. data/docs/ScoreLicense.md +0 -7
  287. data/docs/ScoreLikesCounts.md +0 -10
  288. data/docs/ScoreModification.md +0 -14
  289. data/docs/ScorePrivacy.md +0 -7
  290. data/docs/ScoreRevision.md +0 -14
  291. data/docs/ScoreRevisionCreation.md +0 -11
  292. data/docs/ScoreRevisionStatistics.md +0 -9
  293. data/docs/ScoreSource.md +0 -8
  294. data/docs/ScoreSummary.md +0 -13
  295. data/docs/ScoreTrack.md +0 -19
  296. data/docs/ScoreTrackCreation.md +0 -12
  297. data/docs/ScoreTrackPoint.md +0 -10
  298. data/docs/ScoreTrackState.md +0 -7
  299. data/docs/ScoreTrackType.md +0 -7
  300. data/docs/ScoreTrackUpdate.md +0 -11
  301. data/docs/ScoreViewsCounts.md +0 -10
  302. data/docs/UserAdminUpdate.md +0 -9
  303. data/docs/UserApi.md +0 -173
  304. data/docs/UserBasics.md +0 -13
  305. data/docs/UserCreation.md +0 -11
  306. data/docs/UserDetails.md +0 -28
  307. data/docs/UserDetailsAdmin.md +0 -20
  308. data/docs/UserDetailsAdminLicense.md +0 -12
  309. data/docs/UserInstruments.md +0 -7
  310. data/docs/UserPublic.md +0 -25
  311. data/docs/UserPublicSummary.md +0 -17
  312. data/flat_api.gemspec +0 -48
  313. data/lib/flat_api/models/assignment_creation.rb +0 -230
  314. data/lib/flat_api/models/collection_title.rb +0 -179
  315. data/lib/flat_api/models/flat_locales.rb +0 -36
  316. data/lib/flat_api/models/resource_sharing_key.rb +0 -179
  317. data/lib/flat_api/models/score_data.rb +0 -179
  318. data/lib/flat_api/models/score_data_encoding.rb +0 -30
  319. data/lib/flat_api/models/user_details_admin_license.rb +0 -227
  320. data/lib/flat_api/models/user_instruments.rb +0 -179
  321. data/spec/api/account_api_spec.rb +0 -46
  322. data/spec/api/class_api_spec.rb +0 -278
  323. data/spec/api/collection_api_spec.rb +0 -159
  324. data/spec/api/group_api_spec.rb +0 -72
  325. data/spec/api/organization_api_spec.rb +0 -162
  326. data/spec/api/score_api_spec.rb +0 -426
  327. data/spec/api/user_api_spec.rb +0 -73
  328. data/spec/api_client_spec.rb +0 -226
  329. data/spec/configuration_spec.rb +0 -42
  330. data/spec/models/assignment_copy_spec.rb +0 -42
  331. data/spec/models/assignment_creation_spec.rb +0 -66
  332. data/spec/models/assignment_spec.rb +0 -106
  333. data/spec/models/assignment_submission_spec.rb +0 -108
  334. data/spec/models/assignment_submission_update_spec.rb +0 -60
  335. data/spec/models/class_attachment_creation_spec.rb +0 -58
  336. data/spec/models/class_creation_spec.rb +0 -48
  337. data/spec/models/class_details_canvas_spec.rb +0 -48
  338. data/spec/models/class_details_clever_spec.rb +0 -82
  339. data/spec/models/class_details_google_classroom_spec.rb +0 -60
  340. data/spec/models/class_details_google_drive_spec.rb +0 -48
  341. data/spec/models/class_details_lti_spec.rb +0 -54
  342. data/spec/models/class_details_spec.rb +0 -144
  343. data/spec/models/class_roles_spec.rb +0 -36
  344. data/spec/models/class_state_spec.rb +0 -36
  345. data/spec/models/class_update_spec.rb +0 -48
  346. data/spec/models/collection_capabilities_spec.rb +0 -66
  347. data/spec/models/collection_creation_spec.rb +0 -42
  348. data/spec/models/collection_modification_spec.rb +0 -42
  349. data/spec/models/collection_privacy_spec.rb +0 -36
  350. data/spec/models/collection_spec.rb +0 -102
  351. data/spec/models/collection_title_spec.rb +0 -36
  352. data/spec/models/collection_type_spec.rb +0 -36
  353. data/spec/models/flat_error_response_spec.rb +0 -60
  354. data/spec/models/flat_locales_spec.rb +0 -36
  355. data/spec/models/google_classroom_coursework_spec.rb +0 -54
  356. data/spec/models/google_classroom_submission_spec.rb +0 -54
  357. data/spec/models/group_details_spec.rb +0 -78
  358. data/spec/models/group_spec.rb +0 -82
  359. data/spec/models/group_type_spec.rb +0 -36
  360. data/spec/models/license_mode_spec.rb +0 -36
  361. data/spec/models/license_sources_spec.rb +0 -36
  362. data/spec/models/lms_name_spec.rb +0 -36
  363. data/spec/models/lti_credentials_creation_spec.rb +0 -48
  364. data/spec/models/lti_credentials_spec.rb +0 -90
  365. data/spec/models/media_attachment_spec.rb +0 -136
  366. data/spec/models/media_score_sharing_mode_spec.rb +0 -36
  367. data/spec/models/organization_invitation_creation_spec.rb +0 -48
  368. data/spec/models/organization_invitation_spec.rb +0 -78
  369. data/spec/models/organization_roles_spec.rb +0 -36
  370. data/spec/models/resource_collaborator_creation_spec.rb +0 -78
  371. data/spec/models/resource_collaborator_spec.rb +0 -90
  372. data/spec/models/resource_rights_spec.rb +0 -54
  373. data/spec/models/resource_sharing_key_spec.rb +0 -36
  374. data/spec/models/score_comment_context_spec.rb +0 -78
  375. data/spec/models/score_comment_creation_spec.rb +0 -72
  376. data/spec/models/score_comment_spec.rb +0 -130
  377. data/spec/models/score_comment_update_spec.rb +0 -60
  378. data/spec/models/score_comments_counts_spec.rb +0 -60
  379. data/spec/models/score_creation_spec.rb +0 -78
  380. data/spec/models/score_creation_type_spec.rb +0 -36
  381. data/spec/models/score_data_encoding_spec.rb +0 -36
  382. data/spec/models/score_data_spec.rb +0 -36
  383. data/spec/models/score_details_spec.rb +0 -210
  384. data/spec/models/score_fork_spec.rb +0 -42
  385. data/spec/models/score_license_spec.rb +0 -36
  386. data/spec/models/score_likes_counts_spec.rb +0 -54
  387. data/spec/models/score_modification_spec.rb +0 -78
  388. data/spec/models/score_privacy_spec.rb +0 -36
  389. data/spec/models/score_revision_creation_spec.rb +0 -60
  390. data/spec/models/score_revision_spec.rb +0 -78
  391. data/spec/models/score_revision_statistics_spec.rb +0 -48
  392. data/spec/models/score_source_spec.rb +0 -42
  393. data/spec/models/score_summary_spec.rb +0 -72
  394. data/spec/models/score_track_creation_spec.rb +0 -66
  395. data/spec/models/score_track_point_spec.rb +0 -58
  396. data/spec/models/score_track_spec.rb +0 -108
  397. data/spec/models/score_track_state_spec.rb +0 -36
  398. data/spec/models/score_track_type_spec.rb +0 -36
  399. data/spec/models/score_track_update_spec.rb +0 -60
  400. data/spec/models/score_views_counts_spec.rb +0 -54
  401. data/spec/models/user_admin_update_spec.rb +0 -48
  402. data/spec/models/user_basics_spec.rb +0 -72
  403. data/spec/models/user_creation_spec.rb +0 -60
  404. data/spec/models/user_details_admin_license_spec.rb +0 -66
  405. data/spec/models/user_details_admin_spec.rb +0 -114
  406. data/spec/models/user_details_spec.rb +0 -166
  407. data/spec/models/user_instruments_spec.rb +0 -36
  408. data/spec/models/user_public_spec.rb +0 -144
  409. data/spec/models/user_public_summary_spec.rb +0 -96
  410. data/spec/spec_helper.rb +0 -111
@@ -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, MuseScore, ABC notation, and many other formats * 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.6.0
6
+ The version of the OpenAPI document: 2.26.1
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
+ Generator version: 7.24.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
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.
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
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
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
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.
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
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<(ResourceCollaborator, Fixnum, Hash)>] ResourceCollaborator 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
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
60
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
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 => 'ResourceCollaborator')
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
- # @return [ScoreTrack]
101
+ # @return [ScoreTrackCreationResponse]
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<(ScoreTrackCreationResponse, Integer, Hash)>] ScoreTrackCreationResponse 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
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
134
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
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] || 'ScoreTrackCreationResponse'
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']) unless header_params['Accept']
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). If no `collection` is specified, the API will create the score in the most appropriate collection. This can be the `root` collection or a different collection based on the user's settings or API authentication method. 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}`.
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 a file to create the new Flat document. **Preferred formats**: * **MusicXML**: `.xml`, `.musicxml`, `.mxl` (compressed) — MIME: `vnd.recordare.musicxml+xml`, `vnd.recordare.musicxml`. This is the only format that preserves all notation data (articulations, dynamics, layout, etc.) with full round-trip support. * **MIDI**: `.mid`, `.midi` — MIME: `audio/midi`. Only preserves pitch, timing, and instrument data; notation details are lost. **Also supported** (converted to MusicXML on import, some notation details may be lost): * **Guitar Pro**: `.gp`, `.gp3`, `.gp4`, `.gp5`, `.gpx`, `.gtp` * **MuseScore**: `.mscz`, `.mscx` * **Finale**: `.musx` * **ABC notation**: `.abc` — MIME: `text/vnd.abc` * **PowerTab**: `.ptb` * **Capella**: `.cap`, `.capx` * **MEI**: `.mei` * **Overture**: `.ove` * **TablEdit**: `.tef` * **Band-in-a-Box**: `.mgu`, `.sgu` * **Karaoke MIDI**: `.kar` * **MuseData**: `.md` * **Score Writer**: `.scw` * **Bagpipe Music Writer**: `.bmw`, `.bww` * **Encore**: `.enc` **Scanned music** (requires `supportsTasks`, runs our music recognition and spends credits): * **PDF**: `.pdf` * **Images**: `.jpg`, `.png`, `.webp`, `.tiff`, `.gif`, `.avif`, `.heic`, `.heif` The file is identified by its own content, so its extension and any declared type do not have to match. **One file per request**: a multi-page PDF or a multi-frame TIFF is fine, but several separate images of the same score (a page photographed at a time) need `createOmrJob`, which takes many inputs in one job and bills them as a single document. Its live limits are served by `getOmrCapabilities`. * `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). If no &#x60;collection&#x60; is specified, the API will create the score in the most appropriate collection. This can be the &#x60;root&#x60; collection or a different collection based on the user&#39;s settings or API authentication method. 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;.
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 a file to create the new Flat document. **Preferred formats**: * **MusicXML**: &#x60;.xml&#x60;, &#x60;.musicxml&#x60;, &#x60;.mxl&#x60; (compressed) — MIME: &#x60;vnd.recordare.musicxml+xml&#x60;, &#x60;vnd.recordare.musicxml&#x60;. This is the only format that preserves all notation data (articulations, dynamics, layout, etc.) with full round-trip support. * **MIDI**: &#x60;.mid&#x60;, &#x60;.midi&#x60; — MIME: &#x60;audio/midi&#x60;. Only preserves pitch, timing, and instrument data; notation details are lost. **Also supported** (converted to MusicXML on import, some notation details may be lost): * **Guitar Pro**: &#x60;.gp&#x60;, &#x60;.gp3&#x60;, &#x60;.gp4&#x60;, &#x60;.gp5&#x60;, &#x60;.gpx&#x60;, &#x60;.gtp&#x60; * **MuseScore**: &#x60;.mscz&#x60;, &#x60;.mscx&#x60; * **Finale**: &#x60;.musx&#x60; * **ABC notation**: &#x60;.abc&#x60; — MIME: &#x60;text/vnd.abc&#x60; * **PowerTab**: &#x60;.ptb&#x60; * **Capella**: &#x60;.cap&#x60;, &#x60;.capx&#x60; * **MEI**: &#x60;.mei&#x60; * **Overture**: &#x60;.ove&#x60; * **TablEdit**: &#x60;.tef&#x60; * **Band-in-a-Box**: &#x60;.mgu&#x60;, &#x60;.sgu&#x60; * **Karaoke MIDI**: &#x60;.kar&#x60; * **MuseData**: &#x60;.md&#x60; * **Score Writer**: &#x60;.scw&#x60; * **Bagpipe Music Writer**: &#x60;.bmw&#x60;, &#x60;.bww&#x60; * **Encore**: &#x60;.enc&#x60; **Scanned music** (requires &#x60;supportsTasks&#x60;, runs our music recognition and spends credits): * **PDF**: &#x60;.pdf&#x60; * **Images**: &#x60;.jpg&#x60;, &#x60;.png&#x60;, &#x60;.webp&#x60;, &#x60;.tiff&#x60;, &#x60;.gif&#x60;, &#x60;.avif&#x60;, &#x60;.heic&#x60;, &#x60;.heif&#x60; The file is identified by its own content, so its extension and any declared type do not have to match. **One file per request**: a multi-page PDF or a multi-frame TIFF is fine, but several separate images of the same score (a page photographed at a time) need &#x60;createOmrJob&#x60;, which takes many inputs in one job and bills them as a single document. Its live limits are served by &#x60;getOmrCapabilities&#x60;. * &#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
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
292
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
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
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
366
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
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 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).
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 anyone that has at least read access to the document: - 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 collaborator, the score will be unshared (i.e. removed from the account & own collections). - When called by another user that has the score in its collections, the score will be removed from all the user 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 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).
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 anyone that has at least read access to the document: - 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 collaborator, the score will be unshared (i.e. removed from the account &amp; own collections). - When called by another user that has the score in its collections, the score will be removed from all the user 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
- 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'])
437
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
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,27 @@ 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
472
+ # @option opts [String] :event_properties Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - &#x60;?eventProperties&#x3D;{\&quot;context\&quot;:\&quot;discover\&quot;,\&quot;screenLevel0\&quot;:\&quot;home\&quot;}&#x60;
320
473
  # @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
474
  # @return [nil]
322
475
  def delete_score_comment(score, comment, opts = {})
323
476
  delete_score_comment_with_http_info(score, comment, opts)
324
- return nil
477
+ nil
325
478
  end
326
479
 
327
480
  # 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
481
+ # @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;).
482
+ # @param comment [String] Unique identifier of a sheet music comment
331
483
  # @param [Hash] opts the optional parameters
484
+ # @option opts [String] :event_properties Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - &#x60;?eventProperties&#x3D;{\&quot;context\&quot;:\&quot;discover\&quot;,\&quot;screenLevel0\&quot;:\&quot;home\&quot;}&#x60;
332
485
  # @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.
333
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
486
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
334
487
  def delete_score_comment_with_http_info(score, comment, opts = {})
335
488
  if @api_client.config.debugging
336
- @api_client.config.logger.debug "Calling API: ScoreApi.delete_score_comment ..."
489
+ @api_client.config.logger.debug 'Calling API: ScoreApi.delete_score_comment ...'
337
490
  end
338
491
  # verify the required parameter 'score' is set
339
492
  if @api_client.config.client_side_validation && score.nil?
@@ -344,31 +497,46 @@ module FlatApi
344
497
  fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.delete_score_comment"
345
498
  end
346
499
  # resource path
347
- local_var_path = "/scores/{score}/comments/{comment}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
500
+ local_var_path = '/scores/{score}/comments/{comment}'.sub('{score}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s))
348
501
 
349
502
  # query parameters
350
- query_params = {}
503
+ query_params = opts[:query_params] || {}
504
+ query_params[:'eventProperties'] = opts[:'event_properties'] if !opts[:'event_properties'].nil?
351
505
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
352
506
 
353
507
  # header parameters
354
- header_params = {}
508
+ header_params = opts[:header_params] || {}
355
509
  # HTTP header 'Accept' (if needed)
356
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
510
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
357
511
  # HTTP header 'Content-Type'
358
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
512
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
513
+ if !content_type.nil?
514
+ header_params['Content-Type'] = content_type
515
+ end
359
516
 
360
517
  # form parameters
361
- form_params = {}
518
+ form_params = opts[:form_params] || {}
362
519
 
363
520
  # http body (model)
364
- post_body = nil
365
- auth_names = ['OAuth2']
366
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
521
+ post_body = opts[:debug_body]
522
+
523
+ # return_type
524
+ return_type = opts[:debug_return_type]
525
+
526
+ # auth_names
527
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
528
+
529
+ new_options = opts.merge(
530
+ :operation => :"ScoreApi.delete_score_comment",
367
531
  :header_params => header_params,
368
532
  :query_params => query_params,
369
533
  :form_params => form_params,
370
534
  :body => post_body,
371
- :auth_names => auth_names)
535
+ :auth_names => auth_names,
536
+ :return_type => return_type
537
+ )
538
+
539
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
372
540
  if @api_client.config.debugging
373
541
  @api_client.config.logger.debug "API called: ScoreApi#delete_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
374
542
  end
@@ -376,25 +544,23 @@ module FlatApi
376
544
  end
377
545
 
378
546
  # 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
547
+ # @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;).
548
+ # @param track [String] Unique identifier of a score audio track
382
549
  # @param [Hash] opts the optional parameters
383
550
  # @return [nil]
384
551
  def delete_score_track(score, track, opts = {})
385
552
  delete_score_track_with_http_info(score, track, opts)
386
- return nil
553
+ nil
387
554
  end
388
555
 
389
556
  # 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
557
+ # @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;).
558
+ # @param track [String] Unique identifier of a score audio track
393
559
  # @param [Hash] opts the optional parameters
394
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
560
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
395
561
  def delete_score_track_with_http_info(score, track, opts = {})
396
562
  if @api_client.config.debugging
397
- @api_client.config.logger.debug "Calling API: ScoreApi.delete_score_track ..."
563
+ @api_client.config.logger.debug 'Calling API: ScoreApi.delete_score_track ...'
398
564
  end
399
565
  # verify the required parameter 'score' is set
400
566
  if @api_client.config.client_side_validation && score.nil?
@@ -405,30 +571,39 @@ module FlatApi
405
571
  fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.delete_score_track"
406
572
  end
407
573
  # resource path
408
- local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)
574
+ local_var_path = '/scores/{score}/tracks/{track}'.sub('{score}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s))
409
575
 
410
576
  # query parameters
411
- query_params = {}
577
+ query_params = opts[:query_params] || {}
412
578
 
413
579
  # header parameters
414
- header_params = {}
580
+ header_params = opts[:header_params] || {}
415
581
  # HTTP header 'Accept' (if needed)
416
- 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'])
582
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
419
583
 
420
584
  # form parameters
421
- form_params = {}
585
+ form_params = opts[:form_params] || {}
422
586
 
423
587
  # http body (model)
424
- post_body = nil
425
- auth_names = ['OAuth2']
426
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
588
+ post_body = opts[:debug_body]
589
+
590
+ # return_type
591
+ return_type = opts[:debug_return_type]
592
+
593
+ # auth_names
594
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
595
+
596
+ new_options = opts.merge(
597
+ :operation => :"ScoreApi.delete_score_track",
427
598
  :header_params => header_params,
428
599
  :query_params => query_params,
429
600
  :form_params => form_params,
430
601
  :body => post_body,
431
- :auth_names => auth_names)
602
+ :auth_names => auth_names,
603
+ :return_type => return_type
604
+ )
605
+
606
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
432
607
  if @api_client.config.debugging
433
608
  @api_client.config.logger.debug "API called: ScoreApi#delete_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
434
609
  end
@@ -436,56 +611,73 @@ module FlatApi
436
611
  end
437
612
 
438
613
  # 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}`). When editing the `title` of the score, the API metadata are updated directly when calling this method, unlike the data itself. The title in the score data will be \"lazy\" updated at the next score save with the editor or our internal save.
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;).
614
+ # 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.
615
+ # @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;).
616
+ # @param body [ScoreModification]
441
617
  # @param [Hash] opts the optional parameters
442
- # @option opts [ScoreModification] :body
443
618
  # @return [ScoreDetails]
444
- def edit_score(score, opts = {})
445
- data, _status_code, _headers = edit_score_with_http_info(score, opts)
446
- return data
619
+ def edit_score(score, body, opts = {})
620
+ data, _status_code, _headers = edit_score_with_http_info(score, body, opts)
621
+ data
447
622
  end
448
623
 
449
624
  # 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;). When editing the &#x60;title&#x60; of the score, the API metadata are updated directly when calling this method, unlike the data itself. The title in the score data will be \&quot;lazy\&quot; updated at the next score save with the editor or our internal save.
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;).
625
+ # 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.
626
+ # @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;).
627
+ # @param body [ScoreModification]
452
628
  # @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 = {})
629
+ # @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
630
+ def edit_score_with_http_info(score, body, opts = {})
456
631
  if @api_client.config.debugging
457
- @api_client.config.logger.debug "Calling API: ScoreApi.edit_score ..."
632
+ @api_client.config.logger.debug 'Calling API: ScoreApi.edit_score ...'
458
633
  end
459
634
  # verify the required parameter 'score' is set
460
635
  if @api_client.config.client_side_validation && score.nil?
461
636
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.edit_score"
462
637
  end
638
+ # verify the required parameter 'body' is set
639
+ if @api_client.config.client_side_validation && body.nil?
640
+ fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.edit_score"
641
+ end
463
642
  # resource path
464
- local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)
643
+ local_var_path = '/scores/{score}'.sub('{score}', CGI.escape(score.to_s))
465
644
 
466
645
  # query parameters
467
- query_params = {}
646
+ query_params = opts[:query_params] || {}
468
647
 
469
648
  # header parameters
470
- header_params = {}
649
+ header_params = opts[:header_params] || {}
471
650
  # HTTP header 'Accept' (if needed)
472
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
651
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
473
652
  # HTTP header 'Content-Type'
474
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
653
+ content_type = @api_client.select_header_content_type(['application/json'])
654
+ if !content_type.nil?
655
+ header_params['Content-Type'] = content_type
656
+ end
475
657
 
476
658
  # form parameters
477
- form_params = {}
659
+ form_params = opts[:form_params] || {}
478
660
 
479
661
  # 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,
662
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
663
+
664
+ # return_type
665
+ return_type = opts[:debug_return_type] || 'ScoreDetails'
666
+
667
+ # auth_names
668
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
669
+
670
+ new_options = opts.merge(
671
+ :operation => :"ScoreApi.edit_score",
483
672
  :header_params => header_params,
484
673
  :query_params => query_params,
485
674
  :form_params => form_params,
486
675
  :body => post_body,
487
676
  :auth_names => auth_names,
488
- :return_type => 'ScoreDetails')
677
+ :return_type => return_type
678
+ )
679
+
680
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
489
681
  if @api_client.config.debugging
490
682
  @api_client.config.logger.debug "API called: ScoreApi#edit_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
491
683
  end
@@ -494,26 +686,26 @@ module FlatApi
494
686
 
495
687
  # Fork a score
496
688
  # 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
689
+ # @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;).
690
+ # @param body [ScoreFork]
499
691
  # @param [Hash] opts the optional parameters
500
692
  # @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
693
  # @return [ScoreDetails]
502
694
  def fork_score(score, body, opts = {})
503
695
  data, _status_code, _headers = fork_score_with_http_info(score, body, opts)
504
- return data
696
+ data
505
697
  end
506
698
 
507
699
  # Fork a score
508
700
  # 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
701
+ # @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;).
702
+ # @param body [ScoreFork]
511
703
  # @param [Hash] opts the optional parameters
512
704
  # @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.
513
- # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
705
+ # @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
514
706
  def fork_score_with_http_info(score, body, opts = {})
515
707
  if @api_client.config.debugging
516
- @api_client.config.logger.debug "Calling API: ScoreApi.fork_score ..."
708
+ @api_client.config.logger.debug 'Calling API: ScoreApi.fork_score ...'
517
709
  end
518
710
  # verify the required parameter 'score' is set
519
711
  if @api_client.config.client_side_validation && score.nil?
@@ -524,148 +716,111 @@ module FlatApi
524
716
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.fork_score"
525
717
  end
526
718
  # resource path
527
- local_var_path = "/scores/{score}/fork".sub('{' + 'score' + '}', score.to_s)
719
+ local_var_path = '/scores/{score}/fork'.sub('{score}', CGI.escape(score.to_s))
528
720
 
529
721
  # query parameters
530
- query_params = {}
722
+ query_params = opts[:query_params] || {}
531
723
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
532
724
 
533
725
  # header parameters
534
- header_params = {}
726
+ header_params = opts[:header_params] || {}
535
727
  # HTTP header 'Accept' (if needed)
536
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
728
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
537
729
  # HTTP header 'Content-Type'
538
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
730
+ content_type = @api_client.select_header_content_type(['application/json'])
731
+ if !content_type.nil?
732
+ header_params['Content-Type'] = content_type
733
+ end
539
734
 
540
735
  # form parameters
541
- form_params = {}
736
+ form_params = opts[:form_params] || {}
542
737
 
543
738
  # 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
558
-
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
569
-
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)
739
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
586
740
 
587
- # query parameters
588
- query_params = {}
589
- query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
741
+ # return_type
742
+ return_type = opts[:debug_return_type] || 'ScoreDetails'
590
743
 
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'])
597
-
598
- # form parameters
599
- form_params = {}
744
+ # auth_names
745
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
600
746
 
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,
747
+ new_options = opts.merge(
748
+ :operation => :"ScoreApi.fork_score",
605
749
  :header_params => header_params,
606
750
  :query_params => query_params,
607
751
  :form_params => form_params,
608
752
  :body => post_body,
609
753
  :auth_names => auth_names,
610
- :return_type => 'Array<ScoreDetails>')
754
+ :return_type => return_type
755
+ )
756
+
757
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
611
758
  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}"
759
+ @api_client.config.logger.debug "API called: ScoreApi#fork_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
613
760
  end
614
761
  return data, status_code, headers
615
762
  end
616
763
 
617
764
  # List group's scores
618
765
  # Get the list of scores shared with a group.
619
- # @param group Unique identifier of a Flat group
766
+ # @param group [String] Unique identifier of a Flat group
620
767
  # @param [Hash] opts the optional parameters
621
768
  # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
622
769
  # @return [Array<ScoreDetails>]
623
770
  def get_group_scores(group, opts = {})
624
771
  data, _status_code, _headers = get_group_scores_with_http_info(group, opts)
625
- return data
772
+ data
626
773
  end
627
774
 
628
775
  # List group&#39;s scores
629
776
  # Get the list of scores shared with a group.
630
- # @param group Unique identifier of a Flat group
777
+ # @param group [String] Unique identifier of a Flat group
631
778
  # @param [Hash] opts the optional parameters
632
779
  # @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
780
+ # @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
634
781
  def get_group_scores_with_http_info(group, opts = {})
635
782
  if @api_client.config.debugging
636
- @api_client.config.logger.debug "Calling API: ScoreApi.get_group_scores ..."
783
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_group_scores ...'
637
784
  end
638
785
  # verify the required parameter 'group' is set
639
786
  if @api_client.config.client_side_validation && group.nil?
640
787
  fail ArgumentError, "Missing the required parameter 'group' when calling ScoreApi.get_group_scores"
641
788
  end
642
789
  # resource path
643
- local_var_path = "/groups/{group}/scores".sub('{' + 'group' + '}', group.to_s)
790
+ local_var_path = '/groups/{group}/scores'.sub('{group}', CGI.escape(group.to_s))
644
791
 
645
792
  # query parameters
646
- query_params = {}
793
+ query_params = opts[:query_params] || {}
647
794
  query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
648
795
 
649
796
  # header parameters
650
- header_params = {}
797
+ header_params = opts[:header_params] || {}
651
798
  # HTTP header 'Accept' (if needed)
652
- 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'])
799
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
655
800
 
656
801
  # form parameters
657
- form_params = {}
802
+ form_params = opts[:form_params] || {}
658
803
 
659
804
  # http body (model)
660
- post_body = nil
661
- auth_names = ['OAuth2']
662
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
805
+ post_body = opts[:debug_body]
806
+
807
+ # return_type
808
+ return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
809
+
810
+ # auth_names
811
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
812
+
813
+ new_options = opts.merge(
814
+ :operation => :"ScoreApi.get_group_scores",
663
815
  :header_params => header_params,
664
816
  :query_params => query_params,
665
817
  :form_params => form_params,
666
818
  :body => post_body,
667
819
  :auth_names => auth_names,
668
- :return_type => 'Array<ScoreDetails>')
820
+ :return_type => return_type
821
+ )
822
+
823
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
669
824
  if @api_client.config.debugging
670
825
  @api_client.config.logger.debug "API called: ScoreApi#get_group_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
671
826
  end
@@ -674,56 +829,64 @@ module FlatApi
674
829
 
675
830
  # Get a score's metadata
676
831
  # 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;).
832
+ # @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
833
  # @param [Hash] opts the optional parameters
679
834
  # @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
835
  # @return [ScoreDetails]
681
836
  def get_score(score, opts = {})
682
837
  data, _status_code, _headers = get_score_with_http_info(score, opts)
683
- return data
838
+ data
684
839
  end
685
840
 
686
841
  # Get a score&#39;s metadata
687
842
  # 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;).
843
+ # @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
844
  # @param [Hash] opts the optional parameters
690
845
  # @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.
691
- # @return [Array<(ScoreDetails, Fixnum, Hash)>] ScoreDetails data, response status code and response headers
846
+ # @return [Array<(ScoreDetails, Integer, Hash)>] ScoreDetails data, response status code and response headers
692
847
  def get_score_with_http_info(score, opts = {})
693
848
  if @api_client.config.debugging
694
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score ..."
849
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score ...'
695
850
  end
696
851
  # verify the required parameter 'score' is set
697
852
  if @api_client.config.client_side_validation && score.nil?
698
853
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score"
699
854
  end
700
855
  # resource path
701
- local_var_path = "/scores/{score}".sub('{' + 'score' + '}', score.to_s)
856
+ local_var_path = '/scores/{score}'.sub('{score}', CGI.escape(score.to_s))
702
857
 
703
858
  # query parameters
704
- query_params = {}
859
+ query_params = opts[:query_params] || {}
705
860
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
706
861
 
707
862
  # header parameters
708
- header_params = {}
863
+ header_params = opts[:header_params] || {}
709
864
  # HTTP header 'Accept' (if needed)
710
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
711
- # HTTP header 'Content-Type'
712
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
865
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
713
866
 
714
867
  # form parameters
715
- form_params = {}
868
+ form_params = opts[:form_params] || {}
716
869
 
717
870
  # http body (model)
718
- post_body = nil
719
- auth_names = ['OAuth2']
720
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
871
+ post_body = opts[:debug_body]
872
+
873
+ # return_type
874
+ return_type = opts[:debug_return_type] || 'ScoreDetails'
875
+
876
+ # auth_names
877
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
878
+
879
+ new_options = opts.merge(
880
+ :operation => :"ScoreApi.get_score",
721
881
  :header_params => header_params,
722
882
  :query_params => query_params,
723
883
  :form_params => form_params,
724
884
  :body => post_body,
725
885
  :auth_names => auth_names,
726
- :return_type => 'ScoreDetails')
886
+ :return_type => return_type
887
+ )
888
+
889
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
727
890
  if @api_client.config.debugging
728
891
  @api_client.config.logger.debug "API called: ScoreApi#get_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
729
892
  end
@@ -732,26 +895,26 @@ module FlatApi
732
895
 
733
896
  # Get a collaborator
734
897
  # 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**
898
+ # @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;).
899
+ # @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
737
900
  # @param [Hash] opts the optional parameters
738
901
  # @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.
739
902
  # @return [ResourceCollaborator]
740
903
  def get_score_collaborator(score, collaborator, opts = {})
741
904
  data, _status_code, _headers = get_score_collaborator_with_http_info(score, collaborator, opts)
742
- return data
905
+ data
743
906
  end
744
907
 
745
908
  # Get a collaborator
746
909
  # 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**
910
+ # @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;).
911
+ # @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
749
912
  # @param [Hash] opts the optional parameters
750
913
  # @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.
751
- # @return [Array<(ResourceCollaborator, Fixnum, Hash)>] ResourceCollaborator data, response status code and response headers
914
+ # @return [Array<(ResourceCollaborator, Integer, Hash)>] ResourceCollaborator data, response status code and response headers
752
915
  def get_score_collaborator_with_http_info(score, collaborator, opts = {})
753
916
  if @api_client.config.debugging
754
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborator ..."
917
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_collaborator ...'
755
918
  end
756
919
  # verify the required parameter 'score' is set
757
920
  if @api_client.config.client_side_validation && score.nil?
@@ -762,32 +925,40 @@ module FlatApi
762
925
  fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.get_score_collaborator"
763
926
  end
764
927
  # resource path
765
- local_var_path = "/scores/{score}/collaborators/{collaborator}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'collaborator' + '}', collaborator.to_s)
928
+ local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{score}', CGI.escape(score.to_s)).sub('{collaborator}', CGI.escape(collaborator.to_s))
766
929
 
767
930
  # query parameters
768
- query_params = {}
931
+ query_params = opts[:query_params] || {}
769
932
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
770
933
 
771
934
  # header parameters
772
- header_params = {}
935
+ header_params = opts[:header_params] || {}
773
936
  # HTTP header 'Accept' (if needed)
774
- 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'])
937
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
777
938
 
778
939
  # form parameters
779
- form_params = {}
940
+ form_params = opts[:form_params] || {}
780
941
 
781
942
  # http body (model)
782
- post_body = nil
783
- auth_names = ['OAuth2']
784
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
943
+ post_body = opts[:debug_body]
944
+
945
+ # return_type
946
+ return_type = opts[:debug_return_type] || 'ResourceCollaborator'
947
+
948
+ # auth_names
949
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
950
+
951
+ new_options = opts.merge(
952
+ :operation => :"ScoreApi.get_score_collaborator",
785
953
  :header_params => header_params,
786
954
  :query_params => query_params,
787
955
  :form_params => form_params,
788
956
  :body => post_body,
789
957
  :auth_names => auth_names,
790
- :return_type => 'ResourceCollaborator')
958
+ :return_type => return_type
959
+ )
960
+
961
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
791
962
  if @api_client.config.debugging
792
963
  @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
793
964
  end
@@ -796,56 +967,64 @@ module FlatApi
796
967
 
797
968
  # List the collaborators
798
969
  # 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;).
970
+ # @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
971
  # @param [Hash] opts the optional parameters
801
972
  # @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.
802
973
  # @return [Array<ResourceCollaborator>]
803
974
  def get_score_collaborators(score, opts = {})
804
975
  data, _status_code, _headers = get_score_collaborators_with_http_info(score, opts)
805
- return data
976
+ data
806
977
  end
807
978
 
808
979
  # List the collaborators
809
980
  # 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;).
981
+ # @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
982
  # @param [Hash] opts the optional parameters
812
983
  # @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.
813
- # @return [Array<(Array<ResourceCollaborator>, Fixnum, Hash)>] Array<ResourceCollaborator> data, response status code and response headers
984
+ # @return [Array<(Array<ResourceCollaborator>, Integer, Hash)>] Array<ResourceCollaborator> data, response status code and response headers
814
985
  def get_score_collaborators_with_http_info(score, opts = {})
815
986
  if @api_client.config.debugging
816
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_collaborators ..."
987
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_collaborators ...'
817
988
  end
818
989
  # verify the required parameter 'score' is set
819
990
  if @api_client.config.client_side_validation && score.nil?
820
991
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_collaborators"
821
992
  end
822
993
  # resource path
823
- local_var_path = "/scores/{score}/collaborators".sub('{' + 'score' + '}', score.to_s)
994
+ local_var_path = '/scores/{score}/collaborators'.sub('{score}', CGI.escape(score.to_s))
824
995
 
825
996
  # query parameters
826
- query_params = {}
997
+ query_params = opts[:query_params] || {}
827
998
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
828
999
 
829
1000
  # header parameters
830
- header_params = {}
1001
+ header_params = opts[:header_params] || {}
831
1002
  # HTTP header 'Accept' (if needed)
832
- 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'])
1003
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
835
1004
 
836
1005
  # form parameters
837
- form_params = {}
1006
+ form_params = opts[:form_params] || {}
838
1007
 
839
1008
  # http body (model)
840
- post_body = nil
841
- auth_names = ['OAuth2']
842
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1009
+ post_body = opts[:debug_body]
1010
+
1011
+ # return_type
1012
+ return_type = opts[:debug_return_type] || 'Array<ResourceCollaborator>'
1013
+
1014
+ # auth_names
1015
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1016
+
1017
+ new_options = opts.merge(
1018
+ :operation => :"ScoreApi.get_score_collaborators",
843
1019
  :header_params => header_params,
844
1020
  :query_params => query_params,
845
1021
  :form_params => form_params,
846
1022
  :body => post_body,
847
1023
  :auth_names => auth_names,
848
- :return_type => 'Array<ResourceCollaborator>')
1024
+ :return_type => return_type
1025
+ )
1026
+
1027
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
849
1028
  if @api_client.config.debugging
850
1029
  @api_client.config.logger.debug "API called: ScoreApi#get_score_collaborators\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
851
1030
  end
@@ -854,74 +1033,85 @@ module FlatApi
854
1033
 
855
1034
  # List comments
856
1035
  # 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;).
1036
+ # @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
1037
  # @param [Hash] opts the optional parameters
859
- # @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.
860
1038
  # @option opts [String] :type Filter the comments by type
861
1039
  # @option opts [String] :sort Sort
862
1040
  # @option opts [String] :direction Sort direction
1041
+ # @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.
863
1042
  # @return [Array<ScoreComment>]
864
1043
  def get_score_comments(score, opts = {})
865
1044
  data, _status_code, _headers = get_score_comments_with_http_info(score, opts)
866
- return data
1045
+ data
867
1046
  end
868
1047
 
869
1048
  # List comments
870
1049
  # This method lists the different comments added on a music score (documents and inline) sorted by their post dates.
871
- # @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;).
1050
+ # @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;).
872
1051
  # @param [Hash] opts the optional parameters
873
- # @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.
874
1052
  # @option opts [String] :type Filter the comments by type
875
1053
  # @option opts [String] :sort Sort
876
1054
  # @option opts [String] :direction Sort direction
877
- # @return [Array<(Array<ScoreComment>, Fixnum, Hash)>] Array<ScoreComment> data, response status code and response headers
1055
+ # @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.
1056
+ # @return [Array<(Array<ScoreComment>, Integer, Hash)>] Array<ScoreComment> data, response status code and response headers
878
1057
  def get_score_comments_with_http_info(score, opts = {})
879
1058
  if @api_client.config.debugging
880
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_comments ..."
1059
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_comments ...'
881
1060
  end
882
1061
  # verify the required parameter 'score' is set
883
1062
  if @api_client.config.client_side_validation && score.nil?
884
1063
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_comments"
885
1064
  end
886
- if @api_client.config.client_side_validation && opts[:'type'] && !['document', 'inline'].include?(opts[:'type'])
887
- fail ArgumentError, 'invalid value for "type", must be one of document, inline'
1065
+ allowable_values = ["document", "inline"]
1066
+ if @api_client.config.client_side_validation && opts[:'type'] && !allowable_values.include?(opts[:'type'])
1067
+ fail ArgumentError, "invalid value for \"type\", must be one of #{allowable_values}"
888
1068
  end
889
- if @api_client.config.client_side_validation && opts[:'sort'] && !['date'].include?(opts[:'sort'])
890
- fail ArgumentError, 'invalid value for "sort", must be one of date'
1069
+ allowable_values = ["date"]
1070
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1071
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
891
1072
  end
892
- if @api_client.config.client_side_validation && opts[:'direction'] && !['asc', 'desc'].include?(opts[:'direction'])
893
- fail ArgumentError, 'invalid value for "direction", must be one of asc, desc'
1073
+ allowable_values = ["asc", "desc"]
1074
+ if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
1075
+ fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
894
1076
  end
895
1077
  # resource path
896
- local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)
1078
+ local_var_path = '/scores/{score}/comments'.sub('{score}', CGI.escape(score.to_s))
897
1079
 
898
1080
  # query parameters
899
- query_params = {}
900
- query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1081
+ query_params = opts[:query_params] || {}
901
1082
  query_params[:'type'] = opts[:'type'] if !opts[:'type'].nil?
902
1083
  query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
903
1084
  query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
1085
+ query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
904
1086
 
905
1087
  # header parameters
906
- header_params = {}
1088
+ header_params = opts[:header_params] || {}
907
1089
  # HTTP header 'Accept' (if needed)
908
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
909
- # HTTP header 'Content-Type'
910
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1090
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
911
1091
 
912
1092
  # form parameters
913
- form_params = {}
1093
+ form_params = opts[:form_params] || {}
914
1094
 
915
1095
  # http body (model)
916
- post_body = nil
917
- auth_names = ['OAuth2']
918
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1096
+ post_body = opts[:debug_body]
1097
+
1098
+ # return_type
1099
+ return_type = opts[:debug_return_type] || 'Array<ScoreComment>'
1100
+
1101
+ # auth_names
1102
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1103
+
1104
+ new_options = opts.merge(
1105
+ :operation => :"ScoreApi.get_score_comments",
919
1106
  :header_params => header_params,
920
1107
  :query_params => query_params,
921
1108
  :form_params => form_params,
922
1109
  :body => post_body,
923
1110
  :auth_names => auth_names,
924
- :return_type => 'Array<ScoreComment>')
1111
+ :return_type => return_type
1112
+ )
1113
+
1114
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
925
1115
  if @api_client.config.debugging
926
1116
  @api_client.config.logger.debug "API called: ScoreApi#get_score_comments\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
927
1117
  end
@@ -930,26 +1120,26 @@ module FlatApi
930
1120
 
931
1121
  # Get a score revision
932
1122
  # 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.
933
- # @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;).
934
- # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
1123
+ # @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;).
1124
+ # @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.
935
1125
  # @param [Hash] opts the optional parameters
936
1126
  # @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.
937
1127
  # @return [ScoreRevision]
938
1128
  def get_score_revision(score, revision, opts = {})
939
1129
  data, _status_code, _headers = get_score_revision_with_http_info(score, revision, opts)
940
- return data
1130
+ data
941
1131
  end
942
1132
 
943
1133
  # Get a score revision
944
1134
  # 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.
945
- # @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;).
946
- # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
1135
+ # @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;).
1136
+ # @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.
947
1137
  # @param [Hash] opts the optional parameters
948
1138
  # @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.
949
- # @return [Array<(ScoreRevision, Fixnum, Hash)>] ScoreRevision data, response status code and response headers
1139
+ # @return [Array<(ScoreRevision, Integer, Hash)>] ScoreRevision data, response status code and response headers
950
1140
  def get_score_revision_with_http_info(score, revision, opts = {})
951
1141
  if @api_client.config.debugging
952
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revision ..."
1142
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revision ...'
953
1143
  end
954
1144
  # verify the required parameter 'score' is set
955
1145
  if @api_client.config.client_side_validation && score.nil?
@@ -960,32 +1150,40 @@ module FlatApi
960
1150
  fail ArgumentError, "Missing the required parameter 'revision' when calling ScoreApi.get_score_revision"
961
1151
  end
962
1152
  # resource path
963
- local_var_path = "/scores/{score}/revisions/{revision}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'revision' + '}', revision.to_s)
1153
+ local_var_path = '/scores/{score}/revisions/{revision}'.sub('{score}', CGI.escape(score.to_s)).sub('{revision}', CGI.escape(revision.to_s))
964
1154
 
965
1155
  # query parameters
966
- query_params = {}
1156
+ query_params = opts[:query_params] || {}
967
1157
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
968
1158
 
969
1159
  # header parameters
970
- header_params = {}
1160
+ header_params = opts[:header_params] || {}
971
1161
  # HTTP header 'Accept' (if needed)
972
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
973
- # HTTP header 'Content-Type'
974
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1162
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
975
1163
 
976
1164
  # form parameters
977
- form_params = {}
1165
+ form_params = opts[:form_params] || {}
978
1166
 
979
1167
  # http body (model)
980
- post_body = nil
981
- auth_names = ['OAuth2']
982
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1168
+ post_body = opts[:debug_body]
1169
+
1170
+ # return_type
1171
+ return_type = opts[:debug_return_type] || 'ScoreRevision'
1172
+
1173
+ # auth_names
1174
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1175
+
1176
+ new_options = opts.merge(
1177
+ :operation => :"ScoreApi.get_score_revision",
983
1178
  :header_params => header_params,
984
1179
  :query_params => query_params,
985
1180
  :form_params => form_params,
986
1181
  :body => post_body,
987
1182
  :auth_names => auth_names,
988
- :return_type => 'ScoreRevision')
1183
+ :return_type => return_type
1184
+ )
1185
+
1186
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
989
1187
  if @api_client.config.debugging
990
1188
  @api_client.config.logger.debug "API called: ScoreApi#get_score_revision\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
991
1189
  end
@@ -993,33 +1191,35 @@ module FlatApi
993
1191
  end
994
1192
 
995
1193
  # Get a score revision data
996
- # 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`).
997
- # @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;).
998
- # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
999
- # @param format The format of the file you will retrieve
1194
+ # Retrieve the file corresponding to a score revision (the following formats are available): Flat JSON/Adagio JSON `json`, MusicXML `mxl`/`xml`, ABC notation `abc`, MP3 `mp3`, WAV `wav`, MIDI `midi`, Flat `flat`, a tumbnail of the first page `thumbnail.png` or auto sync points `synchronizationPoints`. ABC notation is a text format that cannot express everything a score contains. Like MIDI, the export is lossy: notation ABC has no equivalent for is approximated or dropped rather than failing the request.
1195
+ # @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;).
1196
+ # @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.
1197
+ # @param format [String] The format of the file you will retrieve
1000
1198
  # @param [Hash] opts the optional parameters
1001
1199
  # @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.
1002
- # @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;.
1003
- # @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
1004
- # @return [String]
1200
+ # @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;.
1201
+ # @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.
1202
+ # @option opts [Boolean] :url Returns a json with the &#x60;url&#x60; in it instead of redirecting
1203
+ # @return [File]
1005
1204
  def get_score_revision_data(score, revision, format, opts = {})
1006
1205
  data, _status_code, _headers = get_score_revision_data_with_http_info(score, revision, format, opts)
1007
- return data
1206
+ data
1008
1207
  end
1009
1208
 
1010
1209
  # Get a score revision data
1011
- # 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;).
1012
- # @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;).
1013
- # @param revision Unique identifier of a score revision. You can use &#x60;last&#x60; to fetch the information related to the last version created.
1014
- # @param format The format of the file you will retrieve
1210
+ # 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;, ABC notation &#x60;abc&#x60;, MP3 &#x60;mp3&#x60;, WAV &#x60;wav&#x60;, MIDI &#x60;midi&#x60;, Flat &#x60;flat&#x60;, a tumbnail of the first page &#x60;thumbnail.png&#x60; or auto sync points &#x60;synchronizationPoints&#x60;. ABC notation is a text format that cannot express everything a score contains. Like MIDI, the export is lossy: notation ABC has no equivalent for is approximated or dropped rather than failing the request.
1211
+ # @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;).
1212
+ # @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.
1213
+ # @param format [String] The format of the file you will retrieve
1015
1214
  # @param [Hash] opts the optional parameters
1016
1215
  # @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.
1017
- # @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;.
1018
- # @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
1019
- # @return [Array<(String, Fixnum, Hash)>] String data, response status code and response headers
1216
+ # @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;.
1217
+ # @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.
1218
+ # @option opts [Boolean] :url Returns a json with the &#x60;url&#x60; in it instead of redirecting
1219
+ # @return [Array<(File, Integer, Hash)>] File data, response status code and response headers
1020
1220
  def get_score_revision_data_with_http_info(score, revision, format, opts = {})
1021
1221
  if @api_client.config.debugging
1022
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revision_data ..."
1222
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revision_data ...'
1023
1223
  end
1024
1224
  # verify the required parameter 'score' is set
1025
1225
  if @api_client.config.client_side_validation && score.nil?
@@ -1034,38 +1234,48 @@ module FlatApi
1034
1234
  fail ArgumentError, "Missing the required parameter 'format' when calling ScoreApi.get_score_revision_data"
1035
1235
  end
1036
1236
  # verify enum value
1037
- if @api_client.config.client_side_validation && !['json', 'mxl', 'xml', 'mp3', 'wav', 'midi', 'thumbnail.png'].include?(format)
1038
- fail ArgumentError, "invalid value for 'format', must be one of json, mxl, xml, mp3, wav, midi, thumbnail.png"
1237
+ allowable_values = ["json", "mxl", "xml", "abc", "mp3", "wav", "midi", "flat", "thumbnail.png", "synchronizationPoints"]
1238
+ if @api_client.config.client_side_validation && !allowable_values.include?(format)
1239
+ fail ArgumentError, "invalid value for \"format\", must be one of #{allowable_values}"
1039
1240
  end
1040
1241
  # resource path
1041
- local_var_path = "/scores/{score}/revisions/{revision}/{format}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'revision' + '}', revision.to_s).sub('{' + 'format' + '}', format.to_s)
1242
+ 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))
1042
1243
 
1043
1244
  # query parameters
1044
- query_params = {}
1245
+ query_params = opts[:query_params] || {}
1045
1246
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1046
1247
  query_params[:'parts'] = opts[:'parts'] if !opts[:'parts'].nil?
1047
- query_params[:'onlyCached'] = opts[:'only_cached'] if !opts[:'only_cached'].nil?
1248
+ query_params[:'defaultTrack'] = opts[:'default_track'] if !opts[:'default_track'].nil?
1249
+ query_params[:'url'] = opts[:'url'] if !opts[:'url'].nil?
1048
1250
 
1049
1251
  # header parameters
1050
- header_params = {}
1252
+ header_params = opts[:header_params] || {}
1051
1253
  # HTTP header 'Accept' (if needed)
1052
- 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'])
1053
- # HTTP header 'Content-Type'
1054
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1254
+ 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', 'application/octet-stream']) unless header_params['Accept']
1055
1255
 
1056
1256
  # form parameters
1057
- form_params = {}
1257
+ form_params = opts[:form_params] || {}
1058
1258
 
1059
1259
  # http body (model)
1060
- post_body = nil
1061
- auth_names = ['OAuth2']
1062
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1260
+ post_body = opts[:debug_body]
1261
+
1262
+ # return_type
1263
+ return_type = opts[:debug_return_type] || 'File'
1264
+
1265
+ # auth_names
1266
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1267
+
1268
+ new_options = opts.merge(
1269
+ :operation => :"ScoreApi.get_score_revision_data",
1063
1270
  :header_params => header_params,
1064
1271
  :query_params => query_params,
1065
1272
  :form_params => form_params,
1066
1273
  :body => post_body,
1067
1274
  :auth_names => auth_names,
1068
- :return_type => 'String')
1275
+ :return_type => return_type
1276
+ )
1277
+
1278
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1069
1279
  if @api_client.config.debugging
1070
1280
  @api_client.config.logger.debug "API called: ScoreApi#get_score_revision_data\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1071
1281
  end
@@ -1074,56 +1284,64 @@ module FlatApi
1074
1284
 
1075
1285
  # List the revisions
1076
1286
  # 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.
1077
- # @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;).
1287
+ # @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;).
1078
1288
  # @param [Hash] opts the optional parameters
1079
1289
  # @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.
1080
1290
  # @return [Array<ScoreRevision>]
1081
1291
  def get_score_revisions(score, opts = {})
1082
1292
  data, _status_code, _headers = get_score_revisions_with_http_info(score, opts)
1083
- return data
1293
+ data
1084
1294
  end
1085
1295
 
1086
1296
  # List the revisions
1087
1297
  # 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.
1088
- # @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;).
1298
+ # @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;).
1089
1299
  # @param [Hash] opts the optional parameters
1090
1300
  # @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.
1091
- # @return [Array<(Array<ScoreRevision>, Fixnum, Hash)>] Array<ScoreRevision> data, response status code and response headers
1301
+ # @return [Array<(Array<ScoreRevision>, Integer, Hash)>] Array<ScoreRevision> data, response status code and response headers
1092
1302
  def get_score_revisions_with_http_info(score, opts = {})
1093
1303
  if @api_client.config.debugging
1094
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_revisions ..."
1304
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_revisions ...'
1095
1305
  end
1096
1306
  # verify the required parameter 'score' is set
1097
1307
  if @api_client.config.client_side_validation && score.nil?
1098
1308
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_revisions"
1099
1309
  end
1100
1310
  # resource path
1101
- local_var_path = "/scores/{score}/revisions".sub('{' + 'score' + '}', score.to_s)
1311
+ local_var_path = '/scores/{score}/revisions'.sub('{score}', CGI.escape(score.to_s))
1102
1312
 
1103
1313
  # query parameters
1104
- query_params = {}
1314
+ query_params = opts[:query_params] || {}
1105
1315
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1106
1316
 
1107
1317
  # header parameters
1108
- header_params = {}
1318
+ header_params = opts[:header_params] || {}
1109
1319
  # HTTP header 'Accept' (if needed)
1110
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1111
- # HTTP header 'Content-Type'
1112
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1320
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1113
1321
 
1114
1322
  # form parameters
1115
- form_params = {}
1323
+ form_params = opts[:form_params] || {}
1116
1324
 
1117
1325
  # http body (model)
1118
- post_body = nil
1119
- auth_names = ['OAuth2']
1120
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1326
+ post_body = opts[:debug_body]
1327
+
1328
+ # return_type
1329
+ return_type = opts[:debug_return_type] || 'Array<ScoreRevision>'
1330
+
1331
+ # auth_names
1332
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1333
+
1334
+ new_options = opts.merge(
1335
+ :operation => :"ScoreApi.get_score_revisions",
1121
1336
  :header_params => header_params,
1122
1337
  :query_params => query_params,
1123
1338
  :form_params => form_params,
1124
1339
  :body => post_body,
1125
1340
  :auth_names => auth_names,
1126
- :return_type => 'Array<ScoreRevision>')
1341
+ :return_type => return_type
1342
+ )
1343
+
1344
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1127
1345
  if @api_client.config.debugging
1128
1346
  @api_client.config.logger.debug "API called: ScoreApi#get_score_revisions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1129
1347
  end
@@ -1132,53 +1350,61 @@ module FlatApi
1132
1350
 
1133
1351
  # List submissions related to the score
1134
1352
  # 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.
1135
- # @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 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;).
1136
1354
  # @param [Hash] opts the optional parameters
1137
1355
  # @return [Array<AssignmentSubmission>]
1138
1356
  def get_score_submissions(score, opts = {})
1139
1357
  data, _status_code, _headers = get_score_submissions_with_http_info(score, opts)
1140
- return data
1358
+ data
1141
1359
  end
1142
1360
 
1143
1361
  # List submissions related to the score
1144
1362
  # 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.
1145
- # @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;).
1363
+ # @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;).
1146
1364
  # @param [Hash] opts the optional parameters
1147
- # @return [Array<(Array<AssignmentSubmission>, Fixnum, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
1365
+ # @return [Array<(Array<AssignmentSubmission>, Integer, Hash)>] Array<AssignmentSubmission> data, response status code and response headers
1148
1366
  def get_score_submissions_with_http_info(score, opts = {})
1149
1367
  if @api_client.config.debugging
1150
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_submissions ..."
1368
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_submissions ...'
1151
1369
  end
1152
1370
  # verify the required parameter 'score' is set
1153
1371
  if @api_client.config.client_side_validation && score.nil?
1154
1372
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.get_score_submissions"
1155
1373
  end
1156
1374
  # resource path
1157
- local_var_path = "/scores/{score}/submissions".sub('{' + 'score' + '}', score.to_s)
1375
+ local_var_path = '/scores/{score}/submissions'.sub('{score}', CGI.escape(score.to_s))
1158
1376
 
1159
1377
  # query parameters
1160
- query_params = {}
1378
+ query_params = opts[:query_params] || {}
1161
1379
 
1162
1380
  # header parameters
1163
- header_params = {}
1381
+ header_params = opts[:header_params] || {}
1164
1382
  # HTTP header 'Accept' (if needed)
1165
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1166
- # HTTP header 'Content-Type'
1167
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1383
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1168
1384
 
1169
1385
  # form parameters
1170
- form_params = {}
1386
+ form_params = opts[:form_params] || {}
1171
1387
 
1172
1388
  # http body (model)
1173
- post_body = nil
1174
- auth_names = ['OAuth2']
1175
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1389
+ post_body = opts[:debug_body]
1390
+
1391
+ # return_type
1392
+ return_type = opts[:debug_return_type] || 'Array<AssignmentSubmission>'
1393
+
1394
+ # auth_names
1395
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1396
+
1397
+ new_options = opts.merge(
1398
+ :operation => :"ScoreApi.get_score_submissions",
1176
1399
  :header_params => header_params,
1177
1400
  :query_params => query_params,
1178
1401
  :form_params => form_params,
1179
1402
  :body => post_body,
1180
1403
  :auth_names => auth_names,
1181
- :return_type => 'Array<AssignmentSubmission>')
1404
+ :return_type => return_type
1405
+ )
1406
+
1407
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1182
1408
  if @api_client.config.debugging
1183
1409
  @api_client.config.logger.debug "API called: ScoreApi#get_score_submissions\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1184
1410
  end
@@ -1186,27 +1412,25 @@ module FlatApi
1186
1412
  end
1187
1413
 
1188
1414
  # Retrieve the details of an audio or video track linked to a score
1189
- #
1190
- # @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;).
1191
- # @param track Unique identifier of a score audio track
1415
+ # @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;).
1416
+ # @param track [String] Unique identifier of a score audio track
1192
1417
  # @param [Hash] opts the optional parameters
1193
1418
  # @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.
1194
1419
  # @return [ScoreTrack]
1195
1420
  def get_score_track(score, track, opts = {})
1196
1421
  data, _status_code, _headers = get_score_track_with_http_info(score, track, opts)
1197
- return data
1422
+ data
1198
1423
  end
1199
1424
 
1200
1425
  # Retrieve the details of an audio or video track linked to a score
1201
- #
1202
- # @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;).
1203
- # @param track Unique identifier of a score audio track
1426
+ # @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;).
1427
+ # @param track [String] Unique identifier of a score audio track
1204
1428
  # @param [Hash] opts the optional parameters
1205
1429
  # @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.
1206
- # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
1430
+ # @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
1207
1431
  def get_score_track_with_http_info(score, track, opts = {})
1208
1432
  if @api_client.config.debugging
1209
- @api_client.config.logger.debug "Calling API: ScoreApi.get_score_track ..."
1433
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_score_track ...'
1210
1434
  end
1211
1435
  # verify the required parameter 'score' is set
1212
1436
  if @api_client.config.client_side_validation && score.nil?
@@ -1217,90 +1441,218 @@ module FlatApi
1217
1441
  fail ArgumentError, "Missing the required parameter 'track' when calling ScoreApi.get_score_track"
1218
1442
  end
1219
1443
  # resource path
1220
- local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)
1444
+ local_var_path = '/scores/{score}/tracks/{track}'.sub('{score}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s))
1221
1445
 
1222
1446
  # query parameters
1223
- query_params = {}
1447
+ query_params = opts[:query_params] || {}
1224
1448
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1225
1449
 
1226
1450
  # header parameters
1227
- header_params = {}
1451
+ header_params = opts[:header_params] || {}
1228
1452
  # HTTP header 'Accept' (if needed)
1229
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1230
- # HTTP header 'Content-Type'
1231
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1453
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1232
1454
 
1233
1455
  # form parameters
1234
- form_params = {}
1456
+ form_params = opts[:form_params] || {}
1235
1457
 
1236
1458
  # http body (model)
1237
- post_body = nil
1238
- auth_names = ['OAuth2']
1239
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1459
+ post_body = opts[:debug_body]
1460
+
1461
+ # return_type
1462
+ return_type = opts[:debug_return_type] || 'ScoreTrack'
1463
+
1464
+ # auth_names
1465
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1466
+
1467
+ new_options = opts.merge(
1468
+ :operation => :"ScoreApi.get_score_track",
1240
1469
  :header_params => header_params,
1241
1470
  :query_params => query_params,
1242
1471
  :form_params => form_params,
1243
1472
  :body => post_body,
1244
1473
  :auth_names => auth_names,
1245
- :return_type => 'ScoreTrack')
1474
+ :return_type => return_type
1475
+ )
1476
+
1477
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1246
1478
  if @api_client.config.debugging
1247
1479
  @api_client.config.logger.debug "API called: ScoreApi#get_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1248
1480
  end
1249
1481
  return data, status_code, headers
1250
1482
  end
1251
1483
 
1484
+ # List liked scores
1485
+ # @param user [String] Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1486
+ # @param [Hash] opts the optional parameters
1487
+ # @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.
1488
+ # @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.
1489
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
1490
+ # @option opts [Boolean] :ids Return only the identifiers of the scores
1491
+ # @return [Array<ScoreDetails>]
1492
+ def get_user_likes(user, opts = {})
1493
+ data, _status_code, _headers = get_user_likes_with_http_info(user, opts)
1494
+ data
1495
+ end
1496
+
1497
+ # List liked scores
1498
+ # @param user [String] Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1499
+ # @param [Hash] opts the optional parameters
1500
+ # @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.
1501
+ # @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.
1502
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
1503
+ # @option opts [Boolean] :ids Return only the identifiers of the scores
1504
+ # @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
1505
+ def get_user_likes_with_http_info(user, opts = {})
1506
+ if @api_client.config.debugging
1507
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_user_likes ...'
1508
+ end
1509
+ # verify the required parameter 'user' is set
1510
+ if @api_client.config.client_side_validation && user.nil?
1511
+ fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_likes"
1512
+ end
1513
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1514
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_likes, must be smaller than or equal to 100.'
1515
+ end
1516
+
1517
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1518
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_likes, must be greater than or equal to 1.'
1519
+ end
1520
+
1521
+ # resource path
1522
+ local_var_path = '/users/{user}/likes'.sub('{user}', CGI.escape(user.to_s))
1523
+
1524
+ # query parameters
1525
+ query_params = opts[:query_params] || {}
1526
+ query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
1527
+ query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
1528
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1529
+ query_params[:'ids'] = opts[:'ids'] if !opts[:'ids'].nil?
1530
+
1531
+ # header parameters
1532
+ header_params = opts[:header_params] || {}
1533
+ # HTTP header 'Accept' (if needed)
1534
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1535
+
1536
+ # form parameters
1537
+ form_params = opts[:form_params] || {}
1538
+
1539
+ # http body (model)
1540
+ post_body = opts[:debug_body]
1541
+
1542
+ # return_type
1543
+ return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
1544
+
1545
+ # auth_names
1546
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1547
+
1548
+ new_options = opts.merge(
1549
+ :operation => :"ScoreApi.get_user_likes",
1550
+ :header_params => header_params,
1551
+ :query_params => query_params,
1552
+ :form_params => form_params,
1553
+ :body => post_body,
1554
+ :auth_names => auth_names,
1555
+ :return_type => return_type
1556
+ )
1557
+
1558
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1559
+ if @api_client.config.debugging
1560
+ @api_client.config.logger.debug "API called: ScoreApi#get_user_likes\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1561
+ end
1562
+ return data, status_code, headers
1563
+ end
1564
+
1252
1565
  # List user's scores
1253
- # 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.
1254
- # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1566
+ # Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example `GET /v2/collections/allScores/scores` to list all recently updated scores.
1567
+ # @param user [String] Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1255
1568
  # @param [Hash] opts the optional parameters
1256
- # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
1569
+ # @option opts [Boolean] :paginate When set to &#x60;true&#x60;, the API will return a paginated result. When set to &#x60;false&#x60; or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. (default to false)
1570
+ # @option opts [String] :sort Sort
1571
+ # @option opts [String] :direction Sort direction
1572
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
1573
+ # @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.
1574
+ # @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.
1257
1575
  # @return [Array<ScoreDetails>]
1258
1576
  def get_user_scores(user, opts = {})
1259
1577
  data, _status_code, _headers = get_user_scores_with_http_info(user, opts)
1260
- return data
1578
+ data
1261
1579
  end
1262
1580
 
1263
1581
  # List user&#39;s scores
1264
- # 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.
1265
- # @param user Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1582
+ # Get the list of public scores owned by a User. If you want to access to private scores, please use the [Collections API](#tag/Collection). For example &#x60;GET /v2/collections/allScores/scores&#x60; to list all recently updated scores.
1583
+ # @param user [String] Unique identifier of a Flat user. If you authenticated, you can use &#x60;me&#x60; to refer to the current user.
1266
1584
  # @param [Hash] opts the optional parameters
1267
- # @option opts [String] :parent Filter the score forked from the score id &#x60;parent&#x60;
1268
- # @return [Array<(Array<ScoreDetails>, Fixnum, Hash)>] Array<ScoreDetails> data, response status code and response headers
1585
+ # @option opts [Boolean] :paginate When set to &#x60;true&#x60;, the API will return a paginated result. When set to &#x60;false&#x60; or unset, the API will return all the scores. If this parameter is unset or false, then limit/sort/direction/next/previous will be ignored. (default to false)
1586
+ # @option opts [String] :sort Sort
1587
+ # @option opts [String] :direction Sort direction
1588
+ # @option opts [Integer] :limit This is the maximum number of objects that may be returned (default to 25)
1589
+ # @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.
1590
+ # @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.
1591
+ # @return [Array<(Array<ScoreDetails>, Integer, Hash)>] Array<ScoreDetails> data, response status code and response headers
1269
1592
  def get_user_scores_with_http_info(user, opts = {})
1270
1593
  if @api_client.config.debugging
1271
- @api_client.config.logger.debug "Calling API: ScoreApi.get_user_scores ..."
1594
+ @api_client.config.logger.debug 'Calling API: ScoreApi.get_user_scores ...'
1272
1595
  end
1273
1596
  # verify the required parameter 'user' is set
1274
1597
  if @api_client.config.client_side_validation && user.nil?
1275
1598
  fail ArgumentError, "Missing the required parameter 'user' when calling ScoreApi.get_user_scores"
1276
1599
  end
1600
+ allowable_values = ["creationDate", "modificationDate", "title"]
1601
+ if @api_client.config.client_side_validation && opts[:'sort'] && !allowable_values.include?(opts[:'sort'])
1602
+ fail ArgumentError, "invalid value for \"sort\", must be one of #{allowable_values}"
1603
+ end
1604
+ allowable_values = ["asc", "desc"]
1605
+ if @api_client.config.client_side_validation && opts[:'direction'] && !allowable_values.include?(opts[:'direction'])
1606
+ fail ArgumentError, "invalid value for \"direction\", must be one of #{allowable_values}"
1607
+ end
1608
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] > 100
1609
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_scores, must be smaller than or equal to 100.'
1610
+ end
1611
+
1612
+ if @api_client.config.client_side_validation && !opts[:'limit'].nil? && opts[:'limit'] < 1
1613
+ fail ArgumentError, 'invalid value for "opts[:"limit"]" when calling ScoreApi.get_user_scores, must be greater than or equal to 1.'
1614
+ end
1615
+
1277
1616
  # resource path
1278
- local_var_path = "/users/{user}/scores".sub('{' + 'user' + '}', user.to_s)
1617
+ local_var_path = '/users/{user}/scores'.sub('{user}', CGI.escape(user.to_s))
1279
1618
 
1280
1619
  # query parameters
1281
- query_params = {}
1282
- query_params[:'parent'] = opts[:'parent'] if !opts[:'parent'].nil?
1620
+ query_params = opts[:query_params] || {}
1621
+ query_params[:'paginate'] = opts[:'paginate'] if !opts[:'paginate'].nil?
1622
+ query_params[:'sort'] = opts[:'sort'] if !opts[:'sort'].nil?
1623
+ query_params[:'direction'] = opts[:'direction'] if !opts[:'direction'].nil?
1624
+ query_params[:'limit'] = opts[:'limit'] if !opts[:'limit'].nil?
1625
+ query_params[:'next'] = opts[:'_next'] if !opts[:'_next'].nil?
1626
+ query_params[:'previous'] = opts[:'previous'] if !opts[:'previous'].nil?
1283
1627
 
1284
1628
  # header parameters
1285
- header_params = {}
1629
+ header_params = opts[:header_params] || {}
1286
1630
  # HTTP header 'Accept' (if needed)
1287
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1288
- # HTTP header 'Content-Type'
1289
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1631
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1290
1632
 
1291
1633
  # form parameters
1292
- form_params = {}
1634
+ form_params = opts[:form_params] || {}
1293
1635
 
1294
1636
  # http body (model)
1295
- post_body = nil
1296
- auth_names = ['OAuth2']
1297
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1637
+ post_body = opts[:debug_body]
1638
+
1639
+ # return_type
1640
+ return_type = opts[:debug_return_type] || 'Array<ScoreDetails>'
1641
+
1642
+ # auth_names
1643
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1644
+
1645
+ new_options = opts.merge(
1646
+ :operation => :"ScoreApi.get_user_scores",
1298
1647
  :header_params => header_params,
1299
1648
  :query_params => query_params,
1300
1649
  :form_params => form_params,
1301
1650
  :body => post_body,
1302
1651
  :auth_names => auth_names,
1303
- :return_type => 'Array<ScoreDetails>')
1652
+ :return_type => return_type
1653
+ )
1654
+
1655
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1304
1656
  if @api_client.config.debugging
1305
1657
  @api_client.config.logger.debug "API called: ScoreApi#get_user_scores\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1306
1658
  end
@@ -1308,57 +1660,71 @@ module FlatApi
1308
1660
  end
1309
1661
 
1310
1662
  # List the audio or video tracks linked to a score
1311
- #
1312
- # @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;).
1663
+ # List all audio or video tracks linked to a score. **Access Control for Performance Submission Tracks:** Tracks with `purpose: 'performanceSubmission'` are filtered based on user role: * **Students**: Can only see their own performance submission tracks, plus all non-performance tracks * **Teachers and score admins**: Can see all tracks from all students The `assignment` query parameter can be used to filter tracks for a specific assignment, but the access control rules above still apply.
1664
+ # @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;).
1313
1665
  # @param [Hash] opts the optional parameters
1314
1666
  # @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.
1667
+ # @option opts [String] :assignment An assignment id with which all the tracks returned will be related to
1668
+ # @option opts [Boolean] :list_auto_track If true, and if available, return last automatically synchronized Flat&#39;s mp3 export as an additional track
1315
1669
  # @return [Array<ScoreTrack>]
1316
1670
  def list_score_tracks(score, opts = {})
1317
1671
  data, _status_code, _headers = list_score_tracks_with_http_info(score, opts)
1318
- return data
1672
+ data
1319
1673
  end
1320
1674
 
1321
1675
  # List the audio or video tracks linked to a score
1322
- #
1323
- # @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;).
1676
+ # List all audio or video tracks linked to a score. **Access Control for Performance Submission Tracks:** Tracks with &#x60;purpose: &#39;performanceSubmission&#39;&#x60; are filtered based on user role: * **Students**: Can only see their own performance submission tracks, plus all non-performance tracks * **Teachers and score admins**: Can see all tracks from all students The &#x60;assignment&#x60; query parameter can be used to filter tracks for a specific assignment, but the access control rules above still apply.
1677
+ # @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;).
1324
1678
  # @param [Hash] opts the optional parameters
1325
1679
  # @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.
1326
- # @return [Array<(Array<ScoreTrack>, Fixnum, Hash)>] Array<ScoreTrack> data, response status code and response headers
1680
+ # @option opts [String] :assignment An assignment id with which all the tracks returned will be related to
1681
+ # @option opts [Boolean] :list_auto_track If true, and if available, return last automatically synchronized Flat&#39;s mp3 export as an additional track
1682
+ # @return [Array<(Array<ScoreTrack>, Integer, Hash)>] Array<ScoreTrack> data, response status code and response headers
1327
1683
  def list_score_tracks_with_http_info(score, opts = {})
1328
1684
  if @api_client.config.debugging
1329
- @api_client.config.logger.debug "Calling API: ScoreApi.list_score_tracks ..."
1685
+ @api_client.config.logger.debug 'Calling API: ScoreApi.list_score_tracks ...'
1330
1686
  end
1331
1687
  # verify the required parameter 'score' is set
1332
1688
  if @api_client.config.client_side_validation && score.nil?
1333
1689
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.list_score_tracks"
1334
1690
  end
1335
1691
  # resource path
1336
- local_var_path = "/scores/{score}/tracks".sub('{' + 'score' + '}', score.to_s)
1692
+ local_var_path = '/scores/{score}/tracks'.sub('{score}', CGI.escape(score.to_s))
1337
1693
 
1338
1694
  # query parameters
1339
- query_params = {}
1695
+ query_params = opts[:query_params] || {}
1340
1696
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1697
+ query_params[:'assignment'] = opts[:'assignment'] if !opts[:'assignment'].nil?
1698
+ query_params[:'listAutoTrack'] = opts[:'list_auto_track'] if !opts[:'list_auto_track'].nil?
1341
1699
 
1342
1700
  # header parameters
1343
- header_params = {}
1701
+ header_params = opts[:header_params] || {}
1344
1702
  # HTTP header 'Accept' (if needed)
1345
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1346
- # HTTP header 'Content-Type'
1347
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1703
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1348
1704
 
1349
1705
  # form parameters
1350
- form_params = {}
1706
+ form_params = opts[:form_params] || {}
1351
1707
 
1352
1708
  # http body (model)
1353
- post_body = nil
1354
- auth_names = ['OAuth2']
1355
- data, status_code, headers = @api_client.call_api(:GET, local_var_path,
1709
+ post_body = opts[:debug_body]
1710
+
1711
+ # return_type
1712
+ return_type = opts[:debug_return_type] || 'Array<ScoreTrack>'
1713
+
1714
+ # auth_names
1715
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1716
+
1717
+ new_options = opts.merge(
1718
+ :operation => :"ScoreApi.list_score_tracks",
1356
1719
  :header_params => header_params,
1357
1720
  :query_params => query_params,
1358
1721
  :form_params => form_params,
1359
1722
  :body => post_body,
1360
1723
  :auth_names => auth_names,
1361
- :return_type => 'Array<ScoreTrack>')
1724
+ :return_type => return_type
1725
+ )
1726
+
1727
+ data, status_code, headers = @api_client.call_api(:GET, local_var_path, new_options)
1362
1728
  if @api_client.config.debugging
1363
1729
  @api_client.config.logger.debug "API called: ScoreApi#list_score_tracks\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1364
1730
  end
@@ -1366,27 +1732,25 @@ module FlatApi
1366
1732
  end
1367
1733
 
1368
1734
  # Mark the comment as resolved
1369
- #
1370
- # @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;).
1371
- # @param comment Unique identifier of a sheet music comment
1735
+ # @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;).
1736
+ # @param comment [String] Unique identifier of a sheet music comment
1372
1737
  # @param [Hash] opts the optional parameters
1373
1738
  # @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.
1374
1739
  # @return [nil]
1375
1740
  def mark_score_comment_resolved(score, comment, opts = {})
1376
1741
  mark_score_comment_resolved_with_http_info(score, comment, opts)
1377
- return nil
1742
+ nil
1378
1743
  end
1379
1744
 
1380
1745
  # Mark the comment as resolved
1381
- #
1382
- # @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;).
1383
- # @param comment Unique identifier of a sheet music comment
1746
+ # @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;).
1747
+ # @param comment [String] Unique identifier of a sheet music comment
1384
1748
  # @param [Hash] opts the optional parameters
1385
1749
  # @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.
1386
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1750
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1387
1751
  def mark_score_comment_resolved_with_http_info(score, comment, opts = {})
1388
1752
  if @api_client.config.debugging
1389
- @api_client.config.logger.debug "Calling API: ScoreApi.mark_score_comment_resolved ..."
1753
+ @api_client.config.logger.debug 'Calling API: ScoreApi.mark_score_comment_resolved ...'
1390
1754
  end
1391
1755
  # verify the required parameter 'score' is set
1392
1756
  if @api_client.config.client_side_validation && score.nil?
@@ -1397,31 +1761,40 @@ module FlatApi
1397
1761
  fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_resolved"
1398
1762
  end
1399
1763
  # resource path
1400
- local_var_path = "/scores/{score}/comments/{comment}/resolved".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
1764
+ local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{score}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s))
1401
1765
 
1402
1766
  # query parameters
1403
- query_params = {}
1767
+ query_params = opts[:query_params] || {}
1404
1768
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1405
1769
 
1406
1770
  # header parameters
1407
- header_params = {}
1771
+ header_params = opts[:header_params] || {}
1408
1772
  # HTTP header 'Accept' (if needed)
1409
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1410
- # HTTP header 'Content-Type'
1411
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1773
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1412
1774
 
1413
1775
  # form parameters
1414
- form_params = {}
1776
+ form_params = opts[:form_params] || {}
1415
1777
 
1416
1778
  # http body (model)
1417
- post_body = nil
1418
- auth_names = ['OAuth2']
1419
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
1779
+ post_body = opts[:debug_body]
1780
+
1781
+ # return_type
1782
+ return_type = opts[:debug_return_type]
1783
+
1784
+ # auth_names
1785
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1786
+
1787
+ new_options = opts.merge(
1788
+ :operation => :"ScoreApi.mark_score_comment_resolved",
1420
1789
  :header_params => header_params,
1421
1790
  :query_params => query_params,
1422
1791
  :form_params => form_params,
1423
1792
  :body => post_body,
1424
- :auth_names => auth_names)
1793
+ :auth_names => auth_names,
1794
+ :return_type => return_type
1795
+ )
1796
+
1797
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1425
1798
  if @api_client.config.debugging
1426
1799
  @api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_resolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1427
1800
  end
@@ -1429,27 +1802,25 @@ module FlatApi
1429
1802
  end
1430
1803
 
1431
1804
  # Mark the comment as unresolved
1432
- #
1433
- # @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;).
1434
- # @param comment Unique identifier of a sheet music comment
1805
+ # @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;).
1806
+ # @param comment [String] Unique identifier of a sheet music comment
1435
1807
  # @param [Hash] opts the optional parameters
1436
1808
  # @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.
1437
1809
  # @return [nil]
1438
1810
  def mark_score_comment_unresolved(score, comment, opts = {})
1439
1811
  mark_score_comment_unresolved_with_http_info(score, comment, opts)
1440
- return nil
1812
+ nil
1441
1813
  end
1442
1814
 
1443
1815
  # Mark the comment as unresolved
1444
- #
1445
- # @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;).
1446
- # @param comment Unique identifier of a sheet music comment
1816
+ # @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;).
1817
+ # @param comment [String] Unique identifier of a sheet music comment
1447
1818
  # @param [Hash] opts the optional parameters
1448
1819
  # @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.
1449
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1820
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1450
1821
  def mark_score_comment_unresolved_with_http_info(score, comment, opts = {})
1451
1822
  if @api_client.config.debugging
1452
- @api_client.config.logger.debug "Calling API: ScoreApi.mark_score_comment_unresolved ..."
1823
+ @api_client.config.logger.debug 'Calling API: ScoreApi.mark_score_comment_unresolved ...'
1453
1824
  end
1454
1825
  # verify the required parameter 'score' is set
1455
1826
  if @api_client.config.client_side_validation && score.nil?
@@ -1460,31 +1831,40 @@ module FlatApi
1460
1831
  fail ArgumentError, "Missing the required parameter 'comment' when calling ScoreApi.mark_score_comment_unresolved"
1461
1832
  end
1462
1833
  # resource path
1463
- local_var_path = "/scores/{score}/comments/{comment}/resolved".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
1834
+ local_var_path = '/scores/{score}/comments/{comment}/resolved'.sub('{score}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s))
1464
1835
 
1465
1836
  # query parameters
1466
- query_params = {}
1837
+ query_params = opts[:query_params] || {}
1467
1838
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1468
1839
 
1469
1840
  # header parameters
1470
- header_params = {}
1841
+ header_params = opts[:header_params] || {}
1471
1842
  # HTTP header 'Accept' (if needed)
1472
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1473
- # HTTP header 'Content-Type'
1474
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1843
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1475
1844
 
1476
1845
  # form parameters
1477
- form_params = {}
1846
+ form_params = opts[:form_params] || {}
1478
1847
 
1479
1848
  # http body (model)
1480
- post_body = nil
1481
- auth_names = ['OAuth2']
1482
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
1849
+ post_body = opts[:debug_body]
1850
+
1851
+ # return_type
1852
+ return_type = opts[:debug_return_type]
1853
+
1854
+ # auth_names
1855
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1856
+
1857
+ new_options = opts.merge(
1858
+ :operation => :"ScoreApi.mark_score_comment_unresolved",
1483
1859
  :header_params => header_params,
1484
1860
  :query_params => query_params,
1485
1861
  :form_params => form_params,
1486
1862
  :body => post_body,
1487
- :auth_names => auth_names)
1863
+ :auth_names => auth_names,
1864
+ :return_type => return_type
1865
+ )
1866
+
1867
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1488
1868
  if @api_client.config.debugging
1489
1869
  @api_client.config.logger.debug "API called: ScoreApi#mark_score_comment_unresolved\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1490
1870
  end
@@ -1493,26 +1873,26 @@ module FlatApi
1493
1873
 
1494
1874
  # Post a new comment
1495
1875
  # 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`.
1496
- # @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;).
1497
- # @param body
1876
+ # @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;).
1877
+ # @param body [ScoreCommentCreation]
1498
1878
  # @param [Hash] opts the optional parameters
1499
1879
  # @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.
1500
1880
  # @return [ScoreComment]
1501
1881
  def post_score_comment(score, body, opts = {})
1502
1882
  data, _status_code, _headers = post_score_comment_with_http_info(score, body, opts)
1503
- return data
1883
+ data
1504
1884
  end
1505
1885
 
1506
1886
  # Post a new comment
1507
1887
  # 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;.
1508
- # @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;).
1509
- # @param body
1888
+ # @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;).
1889
+ # @param body [ScoreCommentCreation]
1510
1890
  # @param [Hash] opts the optional parameters
1511
1891
  # @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.
1512
- # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
1892
+ # @return [Array<(ScoreComment, Integer, Hash)>] ScoreComment data, response status code and response headers
1513
1893
  def post_score_comment_with_http_info(score, body, opts = {})
1514
1894
  if @api_client.config.debugging
1515
- @api_client.config.logger.debug "Calling API: ScoreApi.post_score_comment ..."
1895
+ @api_client.config.logger.debug 'Calling API: ScoreApi.post_score_comment ...'
1516
1896
  end
1517
1897
  # verify the required parameter 'score' is set
1518
1898
  if @api_client.config.client_side_validation && score.nil?
@@ -1523,32 +1903,45 @@ module FlatApi
1523
1903
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.post_score_comment"
1524
1904
  end
1525
1905
  # resource path
1526
- local_var_path = "/scores/{score}/comments".sub('{' + 'score' + '}', score.to_s)
1906
+ local_var_path = '/scores/{score}/comments'.sub('{score}', CGI.escape(score.to_s))
1527
1907
 
1528
1908
  # query parameters
1529
- query_params = {}
1909
+ query_params = opts[:query_params] || {}
1530
1910
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1531
1911
 
1532
1912
  # header parameters
1533
- header_params = {}
1913
+ header_params = opts[:header_params] || {}
1534
1914
  # HTTP header 'Accept' (if needed)
1535
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1915
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1536
1916
  # HTTP header 'Content-Type'
1537
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1917
+ content_type = @api_client.select_header_content_type(['application/json'])
1918
+ if !content_type.nil?
1919
+ header_params['Content-Type'] = content_type
1920
+ end
1538
1921
 
1539
1922
  # form parameters
1540
- form_params = {}
1923
+ form_params = opts[:form_params] || {}
1541
1924
 
1542
1925
  # http body (model)
1543
- post_body = @api_client.object_to_http_body(body)
1544
- auth_names = ['OAuth2']
1545
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
1926
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
1927
+
1928
+ # return_type
1929
+ return_type = opts[:debug_return_type] || 'ScoreComment'
1930
+
1931
+ # auth_names
1932
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
1933
+
1934
+ new_options = opts.merge(
1935
+ :operation => :"ScoreApi.post_score_comment",
1546
1936
  :header_params => header_params,
1547
1937
  :query_params => query_params,
1548
1938
  :form_params => form_params,
1549
1939
  :body => post_body,
1550
1940
  :auth_names => auth_names,
1551
- :return_type => 'ScoreComment')
1941
+ :return_type => return_type
1942
+ )
1943
+
1944
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1552
1945
  if @api_client.config.debugging
1553
1946
  @api_client.config.logger.debug "API called: ScoreApi#post_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1554
1947
  end
@@ -1557,24 +1950,26 @@ module FlatApi
1557
1950
 
1558
1951
  # Delete a collaborator
1559
1952
  # Remove the specified collaborator from the score
1560
- # @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;).
1561
- # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1953
+ # @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;).
1954
+ # @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1562
1955
  # @param [Hash] opts the optional parameters
1956
+ # @option opts [String] :event_properties Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - &#x60;?eventProperties&#x3D;{\&quot;context\&quot;:\&quot;discover\&quot;,\&quot;screenLevel0\&quot;:\&quot;home\&quot;}&#x60;
1563
1957
  # @return [nil]
1564
1958
  def remove_score_collaborator(score, collaborator, opts = {})
1565
1959
  remove_score_collaborator_with_http_info(score, collaborator, opts)
1566
- return nil
1960
+ nil
1567
1961
  end
1568
1962
 
1569
1963
  # Delete a collaborator
1570
1964
  # Remove the specified collaborator from the score
1571
- # @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;).
1572
- # @param collaborator Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1965
+ # @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;).
1966
+ # @param collaborator [String] Unique identifier of a **collaborator permission**, or unique identifier of a **User**, or unique identifier of a **Group**
1573
1967
  # @param [Hash] opts the optional parameters
1574
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
1968
+ # @option opts [String] :event_properties Optional analytics properties merged into XP tracking for this request. JSON-encoded string representing event properties. Example: - &#x60;?eventProperties&#x3D;{\&quot;context\&quot;:\&quot;discover\&quot;,\&quot;screenLevel0\&quot;:\&quot;home\&quot;}&#x60;
1969
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1575
1970
  def remove_score_collaborator_with_http_info(score, collaborator, opts = {})
1576
1971
  if @api_client.config.debugging
1577
- @api_client.config.logger.debug "Calling API: ScoreApi.remove_score_collaborator ..."
1972
+ @api_client.config.logger.debug 'Calling API: ScoreApi.remove_score_collaborator ...'
1578
1973
  end
1579
1974
  # verify the required parameter 'score' is set
1580
1975
  if @api_client.config.client_side_validation && score.nil?
@@ -1585,30 +1980,45 @@ module FlatApi
1585
1980
  fail ArgumentError, "Missing the required parameter 'collaborator' when calling ScoreApi.remove_score_collaborator"
1586
1981
  end
1587
1982
  # resource path
1588
- local_var_path = "/scores/{score}/collaborators/{collaborator}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'collaborator' + '}', collaborator.to_s)
1983
+ local_var_path = '/scores/{score}/collaborators/{collaborator}'.sub('{score}', CGI.escape(score.to_s)).sub('{collaborator}', CGI.escape(collaborator.to_s))
1589
1984
 
1590
1985
  # query parameters
1591
- query_params = {}
1986
+ query_params = opts[:query_params] || {}
1987
+ query_params[:'eventProperties'] = opts[:'event_properties'] if !opts[:'event_properties'].nil?
1592
1988
 
1593
1989
  # header parameters
1594
- header_params = {}
1990
+ header_params = opts[:header_params] || {}
1595
1991
  # HTTP header 'Accept' (if needed)
1596
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1992
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1597
1993
  # HTTP header 'Content-Type'
1598
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
1994
+ content_type = @api_client.select_header_content_type(['application/x-www-form-urlencoded'])
1995
+ if !content_type.nil?
1996
+ header_params['Content-Type'] = content_type
1997
+ end
1599
1998
 
1600
1999
  # form parameters
1601
- form_params = {}
2000
+ form_params = opts[:form_params] || {}
1602
2001
 
1603
2002
  # http body (model)
1604
- post_body = nil
1605
- auth_names = ['OAuth2']
1606
- data, status_code, headers = @api_client.call_api(:DELETE, local_var_path,
2003
+ post_body = opts[:debug_body]
2004
+
2005
+ # return_type
2006
+ return_type = opts[:debug_return_type]
2007
+
2008
+ # auth_names
2009
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
2010
+
2011
+ new_options = opts.merge(
2012
+ :operation => :"ScoreApi.remove_score_collaborator",
1607
2013
  :header_params => header_params,
1608
2014
  :query_params => query_params,
1609
2015
  :form_params => form_params,
1610
2016
  :body => post_body,
1611
- :auth_names => auth_names)
2017
+ :auth_names => auth_names,
2018
+ :return_type => return_type
2019
+ )
2020
+
2021
+ data, status_code, headers = @api_client.call_api(:DELETE, local_var_path, new_options)
1612
2022
  if @api_client.config.debugging
1613
2023
  @api_client.config.logger.debug "API called: ScoreApi#remove_score_collaborator\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1614
2024
  end
@@ -1617,52 +2027,61 @@ module FlatApi
1617
2027
 
1618
2028
  # Untrash a score
1619
2029
  # This method will remove the score from the `trash` collection and from the deletion queue, and add it back to the original collections.
1620
- # @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;).
2030
+ # @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;).
1621
2031
  # @param [Hash] opts the optional parameters
1622
2032
  # @return [nil]
1623
2033
  def untrash_score(score, opts = {})
1624
2034
  untrash_score_with_http_info(score, opts)
1625
- return nil
2035
+ nil
1626
2036
  end
1627
2037
 
1628
2038
  # Untrash a score
1629
2039
  # 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.
1630
- # @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;).
2040
+ # @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;).
1631
2041
  # @param [Hash] opts the optional parameters
1632
- # @return [Array<(nil, Fixnum, Hash)>] nil, response status code and response headers
2042
+ # @return [Array<(nil, Integer, Hash)>] nil, response status code and response headers
1633
2043
  def untrash_score_with_http_info(score, opts = {})
1634
2044
  if @api_client.config.debugging
1635
- @api_client.config.logger.debug "Calling API: ScoreApi.untrash_score ..."
2045
+ @api_client.config.logger.debug 'Calling API: ScoreApi.untrash_score ...'
1636
2046
  end
1637
2047
  # verify the required parameter 'score' is set
1638
2048
  if @api_client.config.client_side_validation && score.nil?
1639
2049
  fail ArgumentError, "Missing the required parameter 'score' when calling ScoreApi.untrash_score"
1640
2050
  end
1641
2051
  # resource path
1642
- local_var_path = "/scores/{score}/untrash".sub('{' + 'score' + '}', score.to_s)
2052
+ local_var_path = '/scores/{score}/untrash'.sub('{score}', CGI.escape(score.to_s))
1643
2053
 
1644
2054
  # query parameters
1645
- query_params = {}
2055
+ query_params = opts[:query_params] || {}
1646
2056
 
1647
2057
  # header parameters
1648
- header_params = {}
2058
+ header_params = opts[:header_params] || {}
1649
2059
  # HTTP header 'Accept' (if needed)
1650
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
1651
- # HTTP header 'Content-Type'
1652
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2060
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1653
2061
 
1654
2062
  # form parameters
1655
- form_params = {}
2063
+ form_params = opts[:form_params] || {}
1656
2064
 
1657
2065
  # http body (model)
1658
- post_body = nil
1659
- auth_names = []
1660
- data, status_code, headers = @api_client.call_api(:POST, local_var_path,
2066
+ post_body = opts[:debug_body]
2067
+
2068
+ # return_type
2069
+ return_type = opts[:debug_return_type]
2070
+
2071
+ # auth_names
2072
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
2073
+
2074
+ new_options = opts.merge(
2075
+ :operation => :"ScoreApi.untrash_score",
1661
2076
  :header_params => header_params,
1662
2077
  :query_params => query_params,
1663
2078
  :form_params => form_params,
1664
2079
  :body => post_body,
1665
- :auth_names => auth_names)
2080
+ :auth_names => auth_names,
2081
+ :return_type => return_type
2082
+ )
2083
+
2084
+ data, status_code, headers = @api_client.call_api(:POST, local_var_path, new_options)
1666
2085
  if @api_client.config.debugging
1667
2086
  @api_client.config.logger.debug "API called: ScoreApi#untrash_score\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1668
2087
  end
@@ -1670,29 +2089,27 @@ module FlatApi
1670
2089
  end
1671
2090
 
1672
2091
  # Update an existing comment
1673
- #
1674
- # @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;).
1675
- # @param comment Unique identifier of a sheet music comment
1676
- # @param body
2092
+ # @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;).
2093
+ # @param comment [String] Unique identifier of a sheet music comment
2094
+ # @param body [ScoreCommentUpdate]
1677
2095
  # @param [Hash] opts the optional parameters
1678
2096
  # @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.
1679
2097
  # @return [ScoreComment]
1680
2098
  def update_score_comment(score, comment, body, opts = {})
1681
2099
  data, _status_code, _headers = update_score_comment_with_http_info(score, comment, body, opts)
1682
- return data
2100
+ data
1683
2101
  end
1684
2102
 
1685
2103
  # Update an existing comment
1686
- #
1687
- # @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;).
1688
- # @param comment Unique identifier of a sheet music comment
1689
- # @param body
2104
+ # @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;).
2105
+ # @param comment [String] Unique identifier of a sheet music comment
2106
+ # @param body [ScoreCommentUpdate]
1690
2107
  # @param [Hash] opts the optional parameters
1691
2108
  # @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.
1692
- # @return [Array<(ScoreComment, Fixnum, Hash)>] ScoreComment data, response status code and response headers
2109
+ # @return [Array<(ScoreComment, Integer, Hash)>] ScoreComment data, response status code and response headers
1693
2110
  def update_score_comment_with_http_info(score, comment, body, opts = {})
1694
2111
  if @api_client.config.debugging
1695
- @api_client.config.logger.debug "Calling API: ScoreApi.update_score_comment ..."
2112
+ @api_client.config.logger.debug 'Calling API: ScoreApi.update_score_comment ...'
1696
2113
  end
1697
2114
  # verify the required parameter 'score' is set
1698
2115
  if @api_client.config.client_side_validation && score.nil?
@@ -1707,32 +2124,45 @@ module FlatApi
1707
2124
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_comment"
1708
2125
  end
1709
2126
  # resource path
1710
- local_var_path = "/scores/{score}/comments/{comment}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'comment' + '}', comment.to_s)
2127
+ local_var_path = '/scores/{score}/comments/{comment}'.sub('{score}', CGI.escape(score.to_s)).sub('{comment}', CGI.escape(comment.to_s))
1711
2128
 
1712
2129
  # query parameters
1713
- query_params = {}
2130
+ query_params = opts[:query_params] || {}
1714
2131
  query_params[:'sharingKey'] = opts[:'sharing_key'] if !opts[:'sharing_key'].nil?
1715
2132
 
1716
2133
  # header parameters
1717
- header_params = {}
2134
+ header_params = opts[:header_params] || {}
1718
2135
  # HTTP header 'Accept' (if needed)
1719
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2136
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1720
2137
  # HTTP header 'Content-Type'
1721
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2138
+ content_type = @api_client.select_header_content_type(['application/json'])
2139
+ if !content_type.nil?
2140
+ header_params['Content-Type'] = content_type
2141
+ end
1722
2142
 
1723
2143
  # form parameters
1724
- form_params = {}
2144
+ form_params = opts[:form_params] || {}
1725
2145
 
1726
2146
  # http body (model)
1727
- post_body = @api_client.object_to_http_body(body)
1728
- auth_names = ['OAuth2']
1729
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2147
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
2148
+
2149
+ # return_type
2150
+ return_type = opts[:debug_return_type] || 'ScoreComment'
2151
+
2152
+ # auth_names
2153
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
2154
+
2155
+ new_options = opts.merge(
2156
+ :operation => :"ScoreApi.update_score_comment",
1730
2157
  :header_params => header_params,
1731
2158
  :query_params => query_params,
1732
2159
  :form_params => form_params,
1733
2160
  :body => post_body,
1734
2161
  :auth_names => auth_names,
1735
- :return_type => 'ScoreComment')
2162
+ :return_type => return_type
2163
+ )
2164
+
2165
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1736
2166
  if @api_client.config.debugging
1737
2167
  @api_client.config.logger.debug "API called: ScoreApi#update_score_comment\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1738
2168
  end
@@ -1740,27 +2170,25 @@ module FlatApi
1740
2170
  end
1741
2171
 
1742
2172
  # Update an audio or video track linked to a score
1743
- #
1744
- # @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;).
1745
- # @param track Unique identifier of a score audio track
1746
- # @param body
2173
+ # @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;).
2174
+ # @param track [String] Unique identifier of a score audio track
2175
+ # @param body [ScoreTrackUpdate]
1747
2176
  # @param [Hash] opts the optional parameters
1748
2177
  # @return [ScoreTrack]
1749
2178
  def update_score_track(score, track, body, opts = {})
1750
2179
  data, _status_code, _headers = update_score_track_with_http_info(score, track, body, opts)
1751
- return data
2180
+ data
1752
2181
  end
1753
2182
 
1754
2183
  # Update an audio or video track linked to a score
1755
- #
1756
- # @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;).
1757
- # @param track Unique identifier of a score audio track
1758
- # @param body
2184
+ # @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;).
2185
+ # @param track [String] Unique identifier of a score audio track
2186
+ # @param body [ScoreTrackUpdate]
1759
2187
  # @param [Hash] opts the optional parameters
1760
- # @return [Array<(ScoreTrack, Fixnum, Hash)>] ScoreTrack data, response status code and response headers
2188
+ # @return [Array<(ScoreTrack, Integer, Hash)>] ScoreTrack data, response status code and response headers
1761
2189
  def update_score_track_with_http_info(score, track, body, opts = {})
1762
2190
  if @api_client.config.debugging
1763
- @api_client.config.logger.debug "Calling API: ScoreApi.update_score_track ..."
2191
+ @api_client.config.logger.debug 'Calling API: ScoreApi.update_score_track ...'
1764
2192
  end
1765
2193
  # verify the required parameter 'score' is set
1766
2194
  if @api_client.config.client_side_validation && score.nil?
@@ -1775,31 +2203,44 @@ module FlatApi
1775
2203
  fail ArgumentError, "Missing the required parameter 'body' when calling ScoreApi.update_score_track"
1776
2204
  end
1777
2205
  # resource path
1778
- local_var_path = "/scores/{score}/tracks/{track}".sub('{' + 'score' + '}', score.to_s).sub('{' + 'track' + '}', track.to_s)
2206
+ local_var_path = '/scores/{score}/tracks/{track}'.sub('{score}', CGI.escape(score.to_s)).sub('{track}', CGI.escape(track.to_s))
1779
2207
 
1780
2208
  # query parameters
1781
- query_params = {}
2209
+ query_params = opts[:query_params] || {}
1782
2210
 
1783
2211
  # header parameters
1784
- header_params = {}
2212
+ header_params = opts[:header_params] || {}
1785
2213
  # HTTP header 'Accept' (if needed)
1786
- header_params['Accept'] = @api_client.select_header_accept(['application/json'])
2214
+ header_params['Accept'] = @api_client.select_header_accept(['application/json']) unless header_params['Accept']
1787
2215
  # HTTP header 'Content-Type'
1788
- header_params['Content-Type'] = @api_client.select_header_content_type(['application/json'])
2216
+ content_type = @api_client.select_header_content_type(['application/json'])
2217
+ if !content_type.nil?
2218
+ header_params['Content-Type'] = content_type
2219
+ end
1789
2220
 
1790
2221
  # form parameters
1791
- form_params = {}
2222
+ form_params = opts[:form_params] || {}
1792
2223
 
1793
2224
  # http body (model)
1794
- post_body = @api_client.object_to_http_body(body)
1795
- auth_names = ['OAuth2']
1796
- data, status_code, headers = @api_client.call_api(:PUT, local_var_path,
2225
+ post_body = opts[:debug_body] || @api_client.object_to_http_body(body)
2226
+
2227
+ # return_type
2228
+ return_type = opts[:debug_return_type] || 'ScoreTrack'
2229
+
2230
+ # auth_names
2231
+ auth_names = opts[:debug_auth_names] || ['OAuth2']
2232
+
2233
+ new_options = opts.merge(
2234
+ :operation => :"ScoreApi.update_score_track",
1797
2235
  :header_params => header_params,
1798
2236
  :query_params => query_params,
1799
2237
  :form_params => form_params,
1800
2238
  :body => post_body,
1801
2239
  :auth_names => auth_names,
1802
- :return_type => 'ScoreTrack')
2240
+ :return_type => return_type
2241
+ )
2242
+
2243
+ data, status_code, headers = @api_client.call_api(:PUT, local_var_path, new_options)
1803
2244
  if @api_client.config.debugging
1804
2245
  @api_client.config.logger.debug "API called: ScoreApi#update_score_track\nData: #{data.inspect}\nStatus code: #{status_code}\nHeaders: #{headers}"
1805
2246
  end